stablebond-sdk 3.0.20

A IDL library for Etherfuse Stablebonds.
Documentation
//! This code was AUTOGENERATED using the kinobi library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun kinobi to update it.
//!
//! [https://github.com/metaplex-foundation/kinobi]
//!

use num_derive::FromPrimitive;
use thiserror::Error;

#[derive(Clone, Debug, Eq, Error, FromPrimitive, PartialEq)]
pub enum StablebondError {
    /// 6000 (0x1770) - Admin does not match admin in config
    #[error("Admin does not match admin in config")]
    AdminConfigMismatch,
    /// 6001 (0x1771) - Admin is not signer
    #[error("Admin is not signer")]
    AdminIsNotSigner,
    /// 6002 (0x1772) - Delegate is not signer
    #[error("Delegate is not signer")]
    DelegateIsNotSigner,
    /// 6003 (0x1773) - User is not signer
    #[error("User is not signer")]
    UserIsNotSigner,
    /// 6004 (0x1774) - Invalid Delegate Address
    #[error("Invalid Delegate Address")]
    InvalidDelegateAddress,
    /// 6005 (0x1775) - Invalid Delegate Owner
    #[error("Invalid Delegate Owner")]
    InvalidDelegateOwner,
    /// 6006 (0x1776) - Invalid Delegate
    #[error("Invalid Delegate")]
    InvalidDelegate,
    /// 6007 (0x1777) - Delegate not initialized
    #[error("Delegate not initialized")]
    DelegateNotInitialized,
    /// 6008 (0x1778) - Delegate already initialized
    #[error("Delegate already initialized")]
    DelegateAlreadyInitialized,
    /// 6009 (0x1779) - Config already initialized
    #[error("Config already initialized")]
    ConfigAlreadyInitialized,
    /// 6010 (0x177A) - Payment already initialized
    #[error("Payment already initialized")]
    PaymentAlreadyInitialized,
    /// 6011 (0x177B) - Payout already initialized
    #[error("Payout already initialized")]
    PayoutAlreadyInitialized,
    /// 6012 (0x177C) - Invalid Config
    #[error("Invalid Config")]
    InvalidConfig,
    /// 6013 (0x177D) - Invalid Config Address
    #[error("Invalid Config Address")]
    InvalidConfigAddress,
    /// 6014 (0x177E) - Invalid Config Owner
    #[error("Invalid Config Owner")]
    InvalidConfigOwner,
    /// 6015 (0x177F) - Mint is not signer
    #[error("Mint is not signer")]
    MintIsNotSigner,
    /// 6016 (0x1780) - Bond not initialized
    #[error("Bond not initialized")]
    BondNotInitialized,
    /// 6017 (0x1781) - Invalid Bond Owner
    #[error("Invalid Bond Owner")]
    InvalidBondOwner,
    /// 6018 (0x1782) - Issuance already initialized
    #[error("Issuance already initialized")]
    IssuanceAlreadyInitialized,
    /// 6019 (0x1783) - Invalid Issuance
    #[error("Invalid Issuance")]
    InvalidIssuance,
    /// 6020 (0x1784) - Invalid Token 2022 Program
    #[error("Invalid Token 2022 Program")]
    InvalidToken2022Program,
    /// 6021 (0x1785) - Invalid Token Program
    #[error("Invalid Token Program")]
    InvalidTokenProgram,
    /// 6022 (0x1786) - Invalid System Program
    #[error("Invalid System Program")]
    InvalidSystemProgram,
    /// 6023 (0x1787) - Invalid interest rate
    #[error("Invalid interest rate")]
    InvalidInterestRate,
    /// 6024 (0x1788) - Invalid mint for bond
    #[error("Invalid mint for bond")]
    InvalidMintForBond,
    /// 6025 (0x1789) - Invalid price feed owner
    #[error("Invalid price feed owner")]
    InvalidPriceFeedOwner,
    /// 6026 (0x178A) - Issuance not initialized
    #[error("Issuance not initialized")]
    IssuanceNotInitialized,
    /// 6027 (0x178B) - Config not initialized
    #[error("Config not initialized")]
    ConfigNotInitialized,
    /// 6028 (0x178C) - Payment not initialized
    #[error("Payment not initialized")]
    PaymentNotInitialized,
    /// 6029 (0x178D) - Payout not initialized
    #[error("Payout not initialized")]
    PayoutNotInitialized,
    /// 6030 (0x178E) - Invalid Payment Address
    #[error("Invalid Payment Address")]
    InvalidPaymentAddress,
    /// 6031 (0x178F) - Invalid Payout Address
    #[error("Invalid Payout Address")]
    InvalidPayoutAddress,
    /// 6032 (0x1790) - Invalid Payout Owner
    #[error("Invalid Payout Owner")]
    InvalidPayoutOwner,
    /// 6033 (0x1791) - Invalid Payment Owner
    #[error("Invalid Payment Owner")]
    InvalidPaymentOwner,
    /// 6034 (0x1792) - Invalid Issuance Owner
    #[error("Invalid Issuance Owner")]
    InvalidIssuanceOwner,
    /// 6035 (0x1793) - Invalid Mint Owner
    #[error("Invalid Mint Owner")]
    InvalidMintOwner,
    /// 6036 (0x1794) - Invalid Issuance Status
    #[error("Invalid Issuance Status")]
    InvalidIssuanceStatus,
    /// 6037 (0x1795) - Invalid Bond Mint
    #[error("Invalid Bond Mint")]
    InvalidBondMint,
    /// 6038 (0x1796) - Invalid Bond Token Account Owner
    #[error("Invalid Bond Token Account Owner")]
    InvalidBondTokenAccountOwner,
    /// 6039 (0x1797) - Invalid Payment Mint
    #[error("Invalid Payment Mint")]
    InvalidPaymentMint,
    /// 6040 (0x1798) - Invalid Payment Token Account Owner
    #[error("Invalid Payment Token Account Owner")]
    InvalidPaymentTokenAccountOwner,
    /// 6041 (0x1799) - Invalid Payment Token Account
    #[error("Invalid Payment Token Account")]
    InvalidPaymentTokenAccount,
    /// 6042 (0x179A) - Invalid Amount
    #[error("Invalid Amount")]
    InvalidAmount,
    /// 6043 (0x179B) - Oracle Not Configured
    #[error("Oracle Not Configured")]
    OracleNotConfigured,
    /// 6044 (0x179C) - Invalid Oracle
    #[error("Invalid Oracle")]
    InvalidOracleAccount,
    /// 6045 (0x179D) - Unsupported Oracle
    #[error("Unsupported Oracle")]
    UnsupportedOracle,
    /// 6046 (0x179E) - Stale Oracle
    #[error("Stale Oracle")]
    StaleOracle,
    /// 6047 (0x179F) - Math Overflow
    #[error("Math Overflow")]
    MathOverflow,
    /// 6048 (0x17A0) - Unable To Get Clock
    #[error("Unable To Get Clock")]
    UnableToGetClock,
    /// 6049 (0x17A1) - Not Enough Liquidity
    #[error("Not Enough Liquidity")]
    NotEnoughLiquidity,
    /// 6050 (0x17A2) - IssuancePastCutoffTime
    #[error("IssuancePastCutoffTime")]
    IssuancePastCutoffTime,
    /// 6051 (0x17A3) - Issuance Not Started
    #[error("Issuance Not Started")]
    IssuanceNotStarted,
    /// 6052 (0x17A4) - Invalid NFT Issuance Vault Owner
    #[error("Invalid NFT Issuance Vault Owner")]
    InvalidNftIssuanceVaultOwner,
    /// 6053 (0x17A5) - Invalid NFT Issuance Vault
    #[error("Invalid NFT Issuance Vault")]
    InvalidNftIssuanceVault,
    /// 6054 (0x17A6) - Failed To Create Nft Collection
    #[error("Failed To Create Nft Collection")]
    FailedToCreateNftCollection,
    /// 6055 (0x17A7) - No Redemptions Requested
    #[error("No Redemptions Requested")]
    NoRedemptionsRequested,
    /// 6056 (0x17A8) - Invalide Price Feed Account
    #[error("Invalide Price Feed Account")]
    InvalidPriceFeedAccount,
    /// 6057 (0x17A9) - PaymentFeed Not Initialized
    #[error("PaymentFeed Not Initialized")]
    PaymentFeedNotInitialized,
    /// 6058 (0x17AA) - Invalid Payment Feed
    #[error("Invalid Payment Feed")]
    InvalidPaymentFeed,
    /// 6059 (0x17AB) - Invalid Account
    #[error("Invalid Account")]
    InvalidAccount,
    /// 6060 (0x17AC) - Issuance Not Ready To Start
    #[error("Issuance Not Ready To Start")]
    IssuanceNotReadyToStart,
    /// 6061 (0x17AD) - Invalid Admin Account
    #[error("Invalid Admin Account")]
    InvalidAdminAccount,
    /// 6062 (0x17AE) - Invalid Config Account
    #[error("Invalid Config Account")]
    InvalidConfigAccount,
    /// 6063 (0x17AF) - Invalid Delegate Account
    #[error("Invalid Delegate Account")]
    InvalidDelegateAccount,
    /// 6064 (0x17B0) - Invalid Bond Account
    #[error("Invalid Bond Account")]
    InvalidBondAccount,
    /// 6065 (0x17B1) - Invalid Issuance Account
    #[error("Invalid Issuance Account")]
    InvalidIssuanceAccount,
    /// 6066 (0x17B2) - Invalid Payment Account
    #[error("Invalid Payment Account")]
    InvalidPaymentAccount,
    /// 6067 (0x17B3) - Invalid Payout Account
    #[error("Invalid Payout Account")]
    InvalidPayoutAccount,
    /// 6068 (0x17B4) - Invalid Argument
    #[error("Invalid Argument")]
    InvalidArgument,
    /// 6069 (0x17B5) - Invalid Price
    #[error("Invalid Price")]
    InvalidPrice,
    /// 6070 (0x17B6) - Invalid Payment Feed Owner
    #[error("Invalid Payment Feed Owner")]
    InvalidPaymentFeedOwner,
    /// 6071 (0x17B7) - Invalid Payment Feed Account
    #[error("Invalid Payment Feed Account")]
    InvalidPaymentFeedAccount,
    /// 6072 (0x17B8) - Purchase Order Not Initialized
    #[error("Purchase Order Not Initialized")]
    PurchaseOrderNotInitialized,
    /// 6073 (0x17B9) - Invalid User NFT Token Account Owner
    #[error("Invalid User NFT Token Account Owner")]
    InvalidUserNftTokenAccountOwner,
    /// 6074 (0x17BA) - Invalid Purchase Order Status
    #[error("Invalid Purchase Order Status")]
    InvalidPurchaseOrderStatus,
    /// 6075 (0x17BB) - Invalid Purchase Order
    #[error("Invalid Purchase Order")]
    InvalidPurchaseOrder,
    /// 6076 (0x17BC) - Invalid Purchase Order Account Owner
    #[error("Invalid Purchase Order Account Owner")]
    InvalidPurchaseOrderAccountOwner,
    /// 6077 (0x17BD) - Issuance Not Matured
    #[error("Issuance Not Matured")]
    IssuanceNotMatured,
    /// 6078 (0x17BE) - Invalid User Payment Token Account Owner
    #[error("Invalid User Payment Token Account Owner")]
    InvalidUserPaymentTokenAccountOwner,
    /// 6079 (0x17BF) - Invalid Nft Collection
    #[error("Invalid Nft Collection")]
    InvalidNftCollection,
    /// 6080 (0x17C0) - Current Issuance Not Over
    #[error("Current Issuance Not Over")]
    CurrentIssuanceNotOver,
    /// 6081 (0x17C1) - Account Is Not Writeable
    #[error("Account Is Not Writeable")]
    AccountIsNotWriteable,
    /// 6082 (0x17C2) - Price feed exceeded provided confidence interval
    #[error("Price feed exceeded provided confidence interval")]
    ConfidenceIntervalExceeded,
    /// 6083 (0x17C3) - Price feed has invalid confidence interval
    #[error("Price feed has invalid confidence interval")]
    InvalidConfidenceInterval,
    /// 6084 (0x17C4) - Past Issuance Cutoff Time
    #[error("Past Issuance Cutoff Time")]
    PastIssuanceCutoffTime,
    /// 6085 (0x17C5) - Invalid Kyc Account
    #[error("Invalid Kyc Account")]
    InvalidKycAccount,
    /// 6086 (0x17C6) - Kyc Not Initialized
    #[error("Kyc Not Initialized")]
    KycNotInitialized,
    /// 6087 (0x17C7) - Sell Liquidity Already Initialized
    #[error("Sell Liquidity Already Initialized")]
    SellLiquidityAlreadyInitialized,
    /// 6088 (0x17C8) - Insufficient Liquidity
    #[error("Insufficient Liquidity")]
    InsufficientLiquidity,
    /// 6089 (0x17C9) - Invalid Offramp Account
    #[error("Invalid Offramp Account")]
    InvalidOfframpAccount,
    /// 6090 (0x17CA) - Offramp Not Initialized
    #[error("Offramp Not Initialized")]
    OfframpNotInitialized,
    /// 6091 (0x17CB) - Invalid Onramp Account
    #[error("Invalid Onramp Account")]
    InvalidOnrampAccount,
    /// 6092 (0x17CC) - Onramp Not Initialized
    #[error("Onramp Not Initialized")]
    OnrampNotInitialized,
    /// 6093 (0x17CD) - Invalid Sequence Account
    #[error("Invalid Sequence Account")]
    InvalidSequenceAccount,
    /// 6094 (0x17CE) - Sequence Not Initialized
    #[error("Sequence Not Initialized")]
    SequenceNotInitialized,
    /// 6095 (0x17CF) - Invalid Offramp Status
    #[error("Invalid Offramp Status")]
    InvalidOfframpStatus,
    /// 6096 (0x17D0) - Multisig Required
    #[error("Multisig Required")]
    MultisigRequired,
    /// 6097 (0x17D1) - Failed to create mint instruction
    #[error("Failed to create mint instruction")]
    FailedToCreateMintInstruction,
    /// 6098 (0x17D2) - Bond Multisig Meta Not Initialized
    #[error("Bond Multisig Meta Not Initialized")]
    BondMultisigMetaNotInitialized,
    /// 6099 (0x17D3) - Invalid Fee Basis Points
    #[error("Invalid Fee Basis Points")]
    InvalidFeeBps,
    /// 6100 (0x17D4) - Instruction has been deprecated
    #[error("Instruction has been deprecated")]
    InstructionDeprecated,
    /// 6101 (0x17D5) - Instruction is disabled, contact Etherfuse for OTC
    #[error("Instruction is disabled, contact Etherfuse for OTC")]
    InstructionDisabled,
    /// 6102 (0x17D6) - Invalid Bond Price Address
    #[error("Invalid Bond Price Address")]
    InvalidBondPriceAddress,
    /// 6103 (0x17D7) - Bond Price already initialized
    #[error("Bond Price already initialized")]
    BondPriceAlreadyInitialized,
    /// 6104 (0x17D8) - New admin is not signer
    #[error("New admin is not signer")]
    NewAdminIsNotSigner,
}