@solana/kit · Addresses and PDAs

Solana error #2800004

ADDRESSES__MALFORMED_PDA

Appears as Solana error #2800004; Decode this error by running `npx @solana/errors decode -- 2800004 '…'`

Message

Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].

What it means

Base58 address validation and program derived address derivation.

What to do

  • Addresses must decode to exactly 32 bytes; PDA seeds must be 32 bytes or fewer and at most 16 of them.
  • Use the PDA tool on this site to reproduce the derivation and compare bytes.

Decode it locally instead

npx @solana/errors decode -- 2800004 '<base64 context>'

In development, import from @solana/kit as usual and the full message is thrown. In production the message is stripped to keep bundles small; the error object still carries error.context with the same values this page decodes, and isSolanaError(err, SOLANA_ERROR__ADDRESSES__MALFORMED_PDA) lets you branch on it.

Decode another error

Try: