Expand description
Foreign-account trust profiles.
Configurable validation policies for loading accounts owned by external programs. Each profile defines which checks to enforce, allowing programs to explicitly declare their trust assumptions.
§Trust Levels
- Strict: owner + layout_id + exact size + not frozen/closed
- Compatible: owner + layout_id + minimum size (supports newer versions)
- Observational: layout_id only, best-effort (indexers/tooling)
ⓘ
let profile = TrustProfile::strict(&KNOWN_PROGRAM_ID, &MyLayout::LAYOUT_ID, MyLayout::LEN);
let data = profile.load(account)?;
let overlay = MyLayout::overlay(data)?;Structs§
- Trust
Flags - Policy flags for additional constraints.
- Trust
Profile - A foreign-account trust profile.
Enums§
- Trust
Level - Trust level for foreign account validation.
Functions§
- load_
foreign_ with_ profile - Load a foreign account with a trust profile, returning a typed overlay.