Expand description
Hopper-owned PDA ergonomics on top of the native runtime boundary.
Functions§
- const_
program_ address - A program-derived address evaluated at compile time.
- create_
program_ address - Create a program-derived address from seeds and a program ID.
- derive
- Hopper-facing alias for PDA derivation.
- find_
and_ verify_ pda - Verify that an account matches a PDA derived from the given seeds.
- find_
bump_ for_ address - Find the bump under which
seedshash toexpected, searching from 255 down with onesol_sha256per candidate and no curve check (about 150 CU per candidate instead of about 310). ReturnsInvalidSeedswhen no bump matches. Same soundness condition asverify_pda_address: use it only whenexpectedis bound to a program-owned or about-to-be created account; otherwisefind_canonical_bump_checked. - find_
canonical_ bump_ checked - The canonical bump for
seeds, found with the curve check on every candidate, provided the canonical address equalsexpected. - find_
program_ address - Find a program-derived address and its bump seed.
- verify_
pda - Verify that an account’s address matches a PDA derived from the given seeds.
- verify_
pda_ address - Verify that
expectedis the address the PDA hash ofseeds(bump included) yields underprogram_id: onesol_sha256(about 150 CU), nocreate_program_addresssyscall (1,500 CU) and no curve check. - verify_
pda_ address_ checked verify_pda_addresswith the fullcreate_program_addresssyscall, so an address whose hash lands on the ed25519 curve is refused.- verify_
pda_ address_ cold verify_pda_addresskept out of line.- verify_
pda_ from_ stored_ bump - Verify a PDA using the bump stored in account data (cheapest path).
- verify_
pda_ strict - Verify that a raw 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.