Skip to main content

light_sdk_types/
types.rs

1//! Re-export boundary for the vendored compressed-account types consumed by
2//! `light-sdk`.
3//!
4//! This module gathers every type, trait and function that `light-sdk` pulls
5//! from the vendored `crate::lca` module into a single surface so the
6//! dependency is explicit and centralized. It is purely a set of `pub use`
7//! re-exports; the definitions live in `crate::lca`.
8//!
9//! Requires `alloc`, since the instruction-data structures allocate.
10
11// --- Crate root ---
12pub use crate::lca::{
13    CompressedAccountError, InstructionDiscriminator, LightInstructionData, Pubkey,
14};
15// --- Address derivation ---
16pub use crate::lca::address::derive_address;
17// --- Compressed account types ---
18pub use crate::lca::compressed_account::{
19    CompressedAccount, CompressedAccountData, MerkleContext, PackedCompressedAccountWithMerkleContext,
20    PackedMerkleContext, PackedReadOnlyCompressedAccount,
21};
22// --- Instruction data: validity proof ---
23pub use crate::lca::instruction_data::compressed_proof::{
24    CompressedProof, ValidityProof,
25};
26// --- Instruction data: CPI context ---
27pub use crate::lca::instruction_data::cpi_context::CompressedCpiContext;
28// --- Instruction data: address / output params ---
29pub use crate::lca::instruction_data::data::{
30    NewAddressParams, NewAddressParamsAssigned, NewAddressParamsAssignedPacked,
31    NewAddressParamsPacked, OutputCompressedAccountWithPackedContext, PackedReadOnlyAddress,
32    ReadOnlyAddress,
33};
34// --- Instruction data: invoke CPI (v1) ---
35pub use crate::lca::instruction_data::invoke_cpi::InstructionDataInvokeCpi;
36// --- Instruction data: with account info (v2) ---
37pub use crate::lca::instruction_data::with_account_info::{
38    CompressedAccountInfo, InAccountInfo, InstructionDataInvokeCpiWithAccountInfo, OutAccountInfo,
39};
40// --- Instruction data: with read-only (v2) ---
41pub use crate::lca::instruction_data::with_readonly::{
42    InAccount, InstructionDataInvokeCpiWithReadOnly,
43};