#[repr(u32)]pub enum AleaError {
Show 13 variants
InvalidSignature = 0,
InvalidG1Point = 1,
RoundZero = 2,
InvalidFieldElement = 3,
NoSquareRoot = 4,
InvalidG2Point = 5,
PairingError = 6,
WrongChainHash = 7,
WrongPubkey = 8,
ReturnDataMissing = 9,
InvalidGenesisTime = 10,
InvalidPeriod = 11,
UnauthorizedInit = 12,
}Expand description
Alea error codes. Codes 6000-6009 are assigned in declaration order and are part of the v1 CPI interface per ADR 0028 — never renumber, never remove (reserved even if unreachable, see NoSquareRoot).
Canonical source: build-spec/program/spec.md §"Error Codes".
Consumer SDKs (TS @alea-drand/sdk and Rust alea-sdk) map these 1:1.
§Anchor framework error codes to be aware of (not Alea-custom)
T2.AA (Codex C LOW) — Anchor 0.30.1 emits distinct framework codes
for different failure modes on UpdateConfig. Consumers and
monitoring must handle both:
-
2001
ConstraintHasOne:has_one = authoritymismatch — theauthorityaccount’s pubkey does not equalconfig.authority. Fires AFTER account deserialization, BEFORE handler body. -
3010
AccountNotSigner:authority: Signer<'info>present but the account was passed without a signature. Fires during account resolution, EARLIER than 2001.
These are distinct failure modes: wrong key (2001) vs no signature (3010). Tests + monitoring should not conflate them.
Variants§
InvalidSignature = 0
InvalidG1Point = 1
RoundZero = 2
InvalidFieldElement = 3
NoSquareRoot = 4
InvalidG2Point = 5
PairingError = 6
WrongChainHash = 7
WrongPubkey = 8
ReturnDataMissing = 9
InvalidGenesisTime = 10
InvalidPeriod = 11
Implementations§
Trait Implementations§
impl Copy for AleaError
Auto Trait Implementations§
impl Freeze for AleaError
impl RefUnwindSafe for AleaError
impl Send for AleaError
impl Sync for AleaError
impl Unpin for AleaError
impl UnsafeUnpin for AleaError
impl UnwindSafe for AleaError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more