Skip to main content

light_verifier_sdk/
errors.rs

1use anchor_lang::prelude::*;
2
3#[error_code]
4pub enum VerifierSdkError {
5    #[msg("Incompatible Verifying Key with number of public inputs")]
6    IncompatibleVerifyingKeyWithNrPublicInputs,
7    #[msg("WrongPubAmount")]
8    WrongPubAmount,
9    #[msg("WrongTxIntegrityHash")]
10    WrongTxIntegrityHash,
11    #[msg("ProofVerificationFailed")]
12    ProofVerificationFailed,
13    #[msg("Transaction was not executed completely")]
14    TransactionIncomplete,
15    #[msg("AppTransaction was not executed completely")]
16    AppTransactionIncomplete,
17    #[msg("Invalid number of nullifiers")]
18    InvalidNrNullifiers,
19    #[msg("Invalid number of leaves")]
20    InvalidNrLeaves,
21    #[msg("Invalid number of remaining accounts")]
22    InvalidNrRemainingAccounts,
23    #[msg("Invalid address of the new transaction Merkle tree")]
24    InvalidTransactionMerkleTreeAddress,
25    #[msg("Invalid merkle tree root")]
26    InvalidMerkleTreeRoot,
27    #[msg("InconsistentMintProofSenderOrRecipient")]
28    InconsistentMintProofSenderOrRecipient,
29    #[msg("InvalidUtxoSize")]
30    InvalidUtxoSize,
31    #[msg("CloseAccountFailed")]
32    CloseAccountFailed,
33    #[msg("Invalid sender or recipient")]
34    InvalidSenderOrRecipient,
35    #[msg("Proof not verified")]
36    ProofNotVerified,
37    #[msg("Message was provided without event Merkle tree account")]
38    MessageNoMerkleTreeAccount,
39    #[msg("Provided message Merkle tree account has invalid hash function (not SHA256")]
40    EventMerkleTreeInvalidHashFunction,
41    #[msg("Invalid noop progam key")]
42    InvalidNoopPubkey,
43}