use spl_program_error::*;
#[spl_program_error(hash_error_code_start = 2_724_315_840)]
pub enum AccountResolutionError {
#[error("Incorrect account provided")]
IncorrectAccount,
#[error("Not enough accounts provided")]
NotEnoughAccounts,
#[error("No value initialized in TLV data")]
TlvUninitialized,
#[error("Some value initialized in TLV data")]
TlvInitialized,
#[error("Too many pubkeys provided")]
TooManyPubkeys,
#[error("Failed to parse `Pubkey` from bytes")]
InvalidPubkey,
#[error(
"Attempted to deserialize an `AccountMeta` but the underlying type has PDA configs rather \
than a fixed address"
)]
AccountTypeNotAccountMeta,
#[error("Provided list of seed configurations too large for a validation account")]
SeedConfigsTooLarge,
#[error("Not enough bytes available to pack seed configuration")]
NotEnoughBytesForSeed,
#[error("The provided bytes are not valid for a seed configuration")]
InvalidBytesForSeed,
#[error("Tried to pack an invalid seed configuration")]
InvalidSeedConfig,
#[error("Instruction data too small for seed configuration")]
InstructionDataTooSmall,
#[error("Could not find account at specified index")]
AccountNotFound,
#[error("Error in checked math operation")]
CalculationFailure,
#[error("Could not find account data at specified index")]
AccountDataNotFound,
#[error("Account data too small for requested seed configuration")]
AccountDataTooSmall,
#[error("Failed to fetch account")]
AccountFetchFailed,
#[error("Not enough bytes available to pack pubkey data configuration")]
NotEnoughBytesForPubkeyData,
#[error("The provided bytes are not valid for a pubkey data configuration")]
InvalidBytesForPubkeyData,
#[error("Tried to pack an invalid pubkey data configuration")]
InvalidPubkeyDataConfig,
}