Tool

PDA derivation

Enter a program id and seeds exactly as the on-chain code writes them. Get the address, the canonical bump and the raw bytes of every seed, so you can spot encoding mismatches.

Presets:
Seeds (in order)

What a program derived address is

A PDA is an address derived from a program id and a list of seeds via SHA-256, chosen so that it has no private key (it lies off the ed25519 curve). Programs use PDAs to own accounts and to sign CPIs with invoke_signed. find_program_address tries bump values from 255 downward and returns the first one that lands off-curve; that first value is the canonical bump.

Why your client and program disagree

  • Encoding: b"vault" is 5 UTF-8 bytes; a public key is its 32 raw bytes, not the 44-character base58 string; u64 is 8 bytes little-endian (to_le_bytes()).
  • Order: seeds are positional. [mint, owner] and [owner, mint] are different addresses.
  • Program id: derive with the id of the program that will sign, which is not always the program you are calling.
  • Non-canonical bumps: a stored bump that differs from the canonical one still produces a valid PDA, but a different one. Anchor’s seeds + bump constraint fails with ConstraintSeeds (2006) when they diverge.

Common derivations

  • Associated token account: seeds [owner, token_program, mint], program ATokenGPv….
  • Metaplex metadata: seeds ["metadata", metadata_program, mint], program metaqbxx….