ygd58 cc43721cac
feat: add owner_program_id field to AccountWithMetadata
Programs can now verify that input accounts are owned by themselves,
preventing spoofing attacks where malicious programs pass fake accounts
with matching data layouts.

Changes:
- Add optional owner_program_id field to AccountWithMetadata
- Add with_owner_program_id() builder method
- Backward compatible: serde(default) = None for existing data

Usage in programs:
  if let Some(owner) = account.owner_program_id {
      assert_eq!(owner, SELF_PROGRAM_ID, 'account not owned by this program');
  }

Fixes #347
2026-03-27 22:51:01 +01:00
..
2026-03-17 21:25:30 +03:00
2025-08-13 10:01:44 -03:00