38 lines
1.6 KiB
Rust
38 lines
1.6 KiB
Rust
// file: crates/ksp-program-api/src/lib.rs
|
|
// version: 3
|
|
|
|
#![warn(missing_docs)]
|
|
#![deny(unreachable_pub)]
|
|
#![forbid(unsafe_code)]
|
|
|
|
//! Open Program contracts shared by KSP and external Program implementations.
|
|
//!
|
|
//! The foundation exposes Core/Interface types plus the minimal instruction
|
|
//! recognition/decode vocabulary and the instruction decoder trait. Registries,
|
|
//! codecs, runtime logging and execution preparation remain outside this
|
|
//! foundation until their ownership is justified.
|
|
|
|
mod program_instruction_decode;
|
|
mod program_instruction_decoder;
|
|
|
|
/// Result of a successful Program instruction decode attempt.
|
|
pub use self::program_instruction_decode::ProgramInstructionDecodeOutcome;
|
|
/// Recognition strength reported by one Program instruction implementation.
|
|
pub use self::program_instruction_decode::ProgramInstructionRecognition;
|
|
/// Open contract implemented by one Program instruction decoder.
|
|
pub use self::program_instruction_decoder::ProgramInstructionDecoder;
|
|
/// Common KSP error type used by Program-facing contracts.
|
|
pub use ksp_core_lib::Error;
|
|
/// Stable structured code identifying a KSP error category and condition.
|
|
pub use ksp_core_lib::ErrorCode;
|
|
/// Structured contextual field attached to a KSP error.
|
|
pub use ksp_core_lib::ErrorContext;
|
|
/// Canonical Solana account address primitive owned by `ksp-core-lib`.
|
|
pub use ksp_core_lib::Pubkey;
|
|
/// Common KSP result alias using [`Error`].
|
|
pub use ksp_core_lib::Result;
|
|
/// Passive account metadata attached to one Program instruction.
|
|
pub use ksp_interface_lib::ProgramAccountMeta;
|
|
/// Passive, bounded Program instruction wire contract.
|
|
pub use ksp_interface_lib::ProgramInstruction;
|