@solana/kit · Instruction errors (on-chain)

Solana error #4615013

INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND

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

Message

Instruction spent from the balance of an account it does not own

What it means

Kit's typed wrappers around the runtime's InstructionError variants. The same errors exist in the legacy format; see the linked page for causes and fixes.

What to do

  • The index in the context is the failing instruction's position in the transaction.
  • INSTRUCTION_ERROR__CUSTOM carries the program's own error code; this site decodes it.

This wraps the on-chain error ExternalAccountLamportSpend, which has its own page with causes and fixes.

Decode it locally instead

npx @solana/errors decode -- 4615013 '<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__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND) lets you branch on it.

Decode another error

Try: