v0.1.0-pre.020

This commit is contained in:
2026-07-24 22:01:07 +02:00
parent fa2d9d8ecd
commit 4190b2c0ce
84 changed files with 3314 additions and 274 deletions

View File

@@ -1,5 +1,5 @@
// file: kb-lib/src/lib.rs
// version: 21
// version: 22
//! Consolidated decoder, executor, materializer and shared model library.
#![warn(missing_docs)]
@@ -1382,8 +1382,6 @@ pub(crate) use self::decoder::DC_METADATA_MTM_SIGN_METADATA_DISCRIMINATOR;
pub(crate) use self::decoder::DC_METADATA_MTM_SURFACE_CODE;
/// Thaw Delegated Account discriminator.
pub(crate) use self::decoder::DC_METADATA_MTM_THAW_DELEGATED_ACCOUNT_DISCRIMINATOR;
/// Canonical tracing target for this crate.
pub(crate) use self::decoder::DC_METADATA_MTM_TRACING_TARGET;
/// Transfer discriminator.
pub(crate) use self::decoder::DC_METADATA_MTM_TRANSFER_DISCRIMINATOR;
/// Transfer Out Of Escrow discriminator.
@@ -1462,8 +1460,6 @@ pub(crate) use self::decoder::DC_SOLANA_CORE_SLASHING_SURFACE_CODE;
pub(crate) use self::decoder::DC_SOLANA_CORE_STAKE_SURFACE_CODE;
/// Stable System Program surface code.
pub(crate) use self::decoder::DC_SOLANA_CORE_SYSTEM_SURFACE_CODE;
/// Canonical tracing target for this crate.
pub(crate) use self::decoder::DC_SOLANA_CORE_TRACING_TARGET;
/// Byte length of one secp256k1 offsets entry.
pub(crate) use self::decoder::DC_SOLANA_CORE_U8_OFFSETS_BYTES;
/// Byte length of one Ed25519 or secp256r1 offsets entry.
@@ -1490,16 +1486,12 @@ pub(crate) use self::decoder::DC_SPL_ATA_MAX_INSTRUCTION_BYTES;
pub(crate) use self::decoder::DC_SPL_ATA_MAX_TRANSACTION_KEYS;
/// Stable protocol and surface code for the Associated Token Account program.
pub(crate) use self::decoder::DC_SPL_ATA_SURFACE_CODE;
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) use self::decoder::DC_SPL_ATA_TRACING_TARGET;
/// Current stable SPL ElGamal registry event contract version.
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION;
/// Maximum retained SPL ElGamal registry instruction payload size.
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES;
/// Stable SPL ElGamal registry surface code.
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE;
/// Canonical tracing target for the SPL ElGamal registry decoder.
pub(crate) use self::decoder::DC_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
/// Maximum payload prefix retained for bounded Memo diagnostics.
pub(crate) use self::decoder::DC_SPL_MEMO_DIAGNOSTIC_PREFIX_BYTES;
/// Current stable Memo decoded event contract version.
@@ -1508,8 +1500,6 @@ pub(crate) use self::decoder::DC_SPL_MEMO_EVENT_VERSION;
pub(crate) use self::decoder::DC_SPL_MEMO_MAX_PAYLOAD_BYTES;
/// Stable protocol code shared by Memo generations.
pub(crate) use self::decoder::DC_SPL_MEMO_PROTOCOL_CODE;
/// Canonical tracing target for the SPL Memo decoder.
pub(crate) use self::decoder::DC_SPL_MEMO_TRACING_TARGET;
/// Stable Memo v1 surface code.
pub(crate) use self::decoder::DC_SPL_MEMO_V1_SURFACE_CODE;
/// Stable Memo v3 surface code.
@@ -1530,8 +1520,6 @@ pub(crate) use self::decoder::DC_SPL_TOKEN_MAX_BATCH_INSTRUCTIONS;
pub(crate) use self::decoder::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES;
/// Stable protocol and surface code for the classic SPL Token program.
pub(crate) use self::decoder::DC_SPL_TOKEN_SURFACE_CODE;
/// Canonical tracing target for the classic SPL Token decoder.
pub(crate) use self::decoder::DC_SPL_TOKEN_TRACING_TARGET;
/// Maximum prefix retained in bounded Token-2022 diagnostics.
pub(crate) use self::decoder::DC_SPL_TOKEN2022_DIAGNOSTIC_PREFIX_BYTES;
/// Current stable Token-2022 decoded event contract version.
@@ -1548,14 +1536,26 @@ pub(crate) use self::decoder::DC_SPL_TOKEN2022_MAX_INSTRUCTION_BYTES;
pub(crate) use self::decoder::DC_SPL_TOKEN2022_MAX_METADATA_STRING_BYTES;
/// Stable Token-2022 surface code.
pub(crate) use self::decoder::DC_SPL_TOKEN2022_SURFACE_CODE;
/// Canonical tracing target for the Token-2022 decoder.
pub(crate) use self::decoder::DC_SPL_TOKEN2022_TRACING_TARGET;
/// Expected role and privileges for one positional instruction account.
pub(crate) use self::decoder::DcSolanaCoreAccountRole;
/// One resolved outer instruction payload and its provenance relative to the target instruction.
pub(crate) use self::decoder::DcSolanaCoreResolvedInstructionPayload;
/// One parsed SPL ElGamal registry instruction.
pub(crate) use self::decoder::DcSplElGamalRegistryParsedRegistryInstruction;
/// Canonical tracing target for this crate.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA;
/// Canonical tracing target for this crate.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SOLANA_CORE;
/// Canonical tracing target for the Associated Token Account decoder.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_ATA;
/// Canonical tracing target for the SPL ElGamal registry decoder.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_ELGAMAL_REGISTRY;
/// Canonical tracing target for the SPL Memo decoder.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_MEMO;
/// Canonical tracing target for the classic SPL Token decoder.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_TOKEN;
/// Canonical tracing target for the Token-2022 decoder.
pub(crate) use self::decoder::TRACING_TARGET_DECODER_SPL_TOKEN2022;
/// Crate-root access to `decode` from `instruction`.
pub(crate) use self::decoder::decoder_metadata_metaplex_token_metadata_decode;
/// Crate-root access to `entry_for_discriminator` from `instruction`.
@@ -1694,22 +1694,22 @@ pub(crate) use self::decoder::decoder_spl_token2022_decode;
pub(crate) use self::decoder::decoder_spl_token2022_entry_for_tag;
/// Returns the first byte of one retained Token-2022 payload.
pub(crate) use self::decoder::decoder_spl_token2022_payload_tag;
/// Canonical tracing target for this crate.
pub(crate) use self::executor::EX_SOLANA_CORE_TRACING_TARGET;
/// Canonical SPL Memo tracing target.
pub(crate) use self::executor::EX_SPL_ATA_TRACING_TARGET;
/// Canonical tracing target for the SPL ElGamal registry executor.
pub(crate) use self::executor::EX_SPL_ELGAMAL_REGISTRY_TRACING_TARGET;
/// Canonical SPL Memo tracing target.
pub(crate) use self::executor::EX_SPL_MEMO_TRACING_TARGET;
/// Maximum ordered multisig signer occurrences for SPL Token-2022.
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_MULTISIG_SIGNERS;
/// Maximum transfer-fee source account count for SPL Token-2022.
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_TRANSFER_FEE_SOURCE_ACCOUNTS;
/// Maximum UI amount byte length for SPL Token-2022.
pub(crate) use self::executor::EX_SPL_TOKEN2022_MAX_UI_AMOUNT_BYTES;
/// Canonical tracing target for this crate.
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SOLANA_CORE;
/// Canonical SPL Memo tracing target.
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_ATA;
/// Canonical tracing target for the SPL ElGamal registry executor.
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_ELGAMAL_REGISTRY;
/// Canonical SPL Memo tracing target.
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_MEMO;
/// Canonical SPL Token-2022 tracing target.
pub(crate) use self::executor::EX_SPL_TOKEN2022_TRACING_TARGET;
pub(crate) use self::executor::TRACING_TARGET_EXECUTOR_SPL_TOKEN2022;
/// Crate-root access to `build_prepared_plan` from `address_lookup_table`.
pub(crate) use self::executor::executor_solana_core_address_lookup_table_build_prepared_plan;
/// Crate-root access to `build_prepared_plan` from `builder`.
@@ -1756,31 +1756,31 @@ pub(crate) use self::executor::executor_spl_memo_build_prepared_plan;
pub(crate) use self::executor::executor_spl_token2022_build_prepared_plan;
/// Canonical processor name for the native and SPL administration materializer.
pub(crate) use self::materializer::MT_ADMIN_PROCESSOR_NAME;
/// Canonical tracing target for the native and SPL administration materializer.
pub(crate) use self::materializer::MT_ADMIN_TRACING_TARGET;
/// Canonical tracing target for the native compliance audit materializer.
pub(crate) use self::materializer::MT_COMPLIANCE_AUDIT_TRACING_TARGET;
/// Canonical tracing target for the native lifecycle materializer.
pub(crate) use self::materializer::MT_LIFECYCLE_TRACING_TARGET;
/// Stable processor name for SPL Token and ATA risk facts.
pub(crate) use self::materializer::MT_RISK_PROCESSOR_NAME;
/// Stable projection contract version for SPL Token and ATA risk facts.
pub(crate) use self::materializer::MT_RISK_PROJECTION_VERSION;
/// Canonical tracing target for SPL Token and ATA risk facts.
pub(crate) use self::materializer::MT_RISK_TRACING_TARGET;
/// Canonical tracing target for the native stake and vote materializer.
pub(crate) use self::materializer::MT_STAKING_TRACING_TARGET;
/// Stable processor name for Token, ATA and Token-2022 account projections.
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_PROCESSOR_NAME;
/// Stable projection contract version for Token, ATA and Token-2022 account projections.
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_PROJECTION_VERSION;
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
pub(crate) use self::materializer::MT_TOKEN_ACCOUNTS_TRACING_TARGET;
/// Maximum Memo payload accepted by transaction annotations.
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_MAX_MEMO_PAYLOAD_BYTES;
/// Stable processor name for transaction annotations.
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME;
/// Stable projection contract version for transaction annotations.
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION;
/// Canonical tracing target for the native and SPL administration materializer.
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_ADMIN;
/// Canonical tracing target for the native compliance audit materializer.
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_COMPLIANCE_AUDIT;
/// Canonical tracing target for the native lifecycle materializer.
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_LIFECYCLE;
/// Canonical tracing target for SPL Token and ATA risk facts.
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_RISK;
/// Canonical tracing target for the native stake and vote materializer.
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_STAKING;
/// Canonical tracing target for Token, ATA and Token-2022 account projections.
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_TOKEN_ACCOUNTS;
/// Canonical tracing target for transaction annotations.
pub(crate) use self::materializer::MT_TRANSACTION_ANNOTATIONS_TRACING_TARGET;
pub(crate) use self::materializer::TRACING_TARGET_MATERIALIZER_TRANSACTION_ANNOTATIONS;