Skip to main content

Module pda

Module pda 

Source
Expand description

PDA (Program Derived Address) helpers.

Direct syscall-based PDA creation and derivation. No external dependencies.

Functions§

based_try_find_program_address
Find a valid PDA by hashing seeds directly and checking curve validity.
create_program_address
Create a program-derived address from seeds and a program ID.
find_bump_for_address
Find the bump seed for a known PDA address, skipping curve validation.
find_program_address
Find a program-derived address and its bump seed.
read_bump_from_account
Read the bump byte directly from account data at a known offset.
verify_pda
Verify that an account’s address matches a PDA derived from the given seeds.
verify_pda_from_stored_bump
Verify a PDA using the bump stored in account data (cheapest path).
verify_pda_strict
Verify that an address matches a PDA derived from the given seeds.
verify_pda_with_bump
Verify a PDA with an explicit bump seed appended to the seeds.
verify_program_address
Verify that an expected address matches the PDA hash for the provided seeds.