declare_program_keys!() { /* proc-macro */ }
Expand description
Declare a program ID with static PDAs.
Example:
// first arg = program ID
// second arg = list of static PDA names and their seeds.
//
// Rules from solana runtime:
// - Each seed can have a max length of 32 bytes.
// - Each PDA can have max 16 seeds.
sanctum_macros::declare_program_keys!(
"9BoN4yBYwH63LFM9fDamaHK62YjM56hWYZqok7MnAakJ",
[
("state", b"state"),
("empty-kebab", b""),
("multiseed", b"two", b"seeds"),
]
);