Module light_program_interface

Module light_program_interface 

Source
Expand description

LightProgramInterface trait and supporting types for client-side SDK patterns.

Core types:

  • ColdContext - Cold data context (Account or Token)
  • PdaSpec - Spec for PDA loading with typed variant
  • AccountSpec - Unified spec enum for load instruction building
  • LightProgramInterface - Trait for program SDKs

Structs§

PdaSpec
Specification for a program-owned PDA with typed variant.

Enums§

AccountSpec
Account specification for loading cold accounts.
AccountToFetch
Account descriptor for fetching. Routes to the correct indexer endpoint.
ColdContext
Context for cold accounts.

Traits§

LightProgramInterface
Trait for programs to give clients a unified API to load cold program accounts.

Functions§

all_hot
Check if all specs in the slice are hot.
any_cold
Check if any specs in the slice are cold.
discriminator
Extract 8-byte discriminator from account data.
matches_discriminator
Check if account data matches a discriminator.