// file: kb-lib/src/executor/metadata/solana_program_metadata/constants.rs // version: 1 //! Stable Solana Program Metadata executor constants. /// Stable executor name. pub(crate) const EX_METADATA_SPM_EXECUTOR_NAME: &str = "kb-lib.executor.metadata.solana_program_metadata"; /// Conservative maximum inline content accepted by one instruction builder. /// /// Larger payloads must use a pre-funded Buffer account so the final transaction remains within /// the Solana packet boundary after signatures, account keys and message framing are included. pub const EX_METADATA_SPM_MAX_INLINE_DATA_BYTES: usize = 1_024; /// Stable operation code for `Write`. pub const EX_METADATA_SPM_WRITE_OPERATION: &str = "metadata.solana_program_metadata.write"; /// Stable operation code for `Initialize`. pub const EX_METADATA_SPM_INITIALIZE_OPERATION: &str = "metadata.solana_program_metadata.initialize"; /// Stable operation code for `SetAuthority`. pub const EX_METADATA_SPM_SET_AUTHORITY_OPERATION: &str = "metadata.solana_program_metadata.set_authority"; /// Stable operation code for `SetData`. pub const EX_METADATA_SPM_SET_DATA_OPERATION: &str = "metadata.solana_program_metadata.set_data"; /// Stable operation code for `SetImmutable`. pub const EX_METADATA_SPM_SET_IMMUTABLE_OPERATION: &str = "metadata.solana_program_metadata.set_immutable"; /// Stable operation code for `Trim`. pub const EX_METADATA_SPM_TRIM_OPERATION: &str = "metadata.solana_program_metadata.trim"; /// Stable operation code for `Close`. pub const EX_METADATA_SPM_CLOSE_OPERATION: &str = "metadata.solana_program_metadata.close"; /// Stable operation code for `Allocate`. pub const EX_METADATA_SPM_ALLOCATE_OPERATION: &str = "metadata.solana_program_metadata.allocate"; /// Stable operation code for `Extend`. pub const EX_METADATA_SPM_EXTEND_OPERATION: &str = "metadata.solana_program_metadata.extend"; /// Exact current operation inventory implemented by the executor. pub const EX_METADATA_SPM_SUPPORTED_OPERATION_CODES: &[&str] = &[ crate::EX_METADATA_SPM_WRITE_OPERATION, crate::EX_METADATA_SPM_INITIALIZE_OPERATION, crate::EX_METADATA_SPM_SET_AUTHORITY_OPERATION, crate::EX_METADATA_SPM_SET_DATA_OPERATION, crate::EX_METADATA_SPM_SET_IMMUTABLE_OPERATION, crate::EX_METADATA_SPM_TRIM_OPERATION, crate::EX_METADATA_SPM_CLOSE_OPERATION, crate::EX_METADATA_SPM_ALLOCATE_OPERATION, crate::EX_METADATA_SPM_EXTEND_OPERATION, ]; /// Operations that require explicit operator approval before plan construction. pub const EX_METADATA_SPM_DESTRUCTIVE_OPERATION_CODES: &[&str] = &[ crate::EX_METADATA_SPM_WRITE_OPERATION, crate::EX_METADATA_SPM_SET_AUTHORITY_OPERATION, crate::EX_METADATA_SPM_SET_DATA_OPERATION, crate::EX_METADATA_SPM_SET_IMMUTABLE_OPERATION, crate::EX_METADATA_SPM_TRIM_OPERATION, crate::EX_METADATA_SPM_CLOSE_OPERATION, ];