UNPKG

@wuwei-labs/srsly

Version:
306 lines 26.6 kB
/** * This code was AUTOGENERATED using the Codama library. * Please DO NOT EDIT THIS FILE, instead use visitors * to add features, then rerun Codama to update it. * * @see https://github.com/codama-idl/codama */ import { isProgramError, } from '@solana/kit'; import { SRSLY_PROGRAM_ADDRESS } from '../programs'; /** Unauthorized: Unauthorized to use this instruction. Check that you have the correct authority. */ export const SRSLY_ERROR__UNAUTHORIZED = 0x1770; // 6000 /** InvalidDurationMinimum: Invalid duration minimum. Must be between configured minimum and the contract's duration maximum. */ export const SRSLY_ERROR__INVALID_DURATION_MINIMUM = 0x1771; // 6001 /** InvalidDurationMaximum: Invalid duration maximum. Must be greater than or equal to duration minimum and less than config maximum. */ export const SRSLY_ERROR__INVALID_DURATION_MAXIMUM = 0x1772; // 6002 /** InvalidRateCalculation: Invalid payment amount (rate * payment periods). Check your calculation. */ export const SRSLY_ERROR__INVALID_RATE_CALCULATION = 0x1773; // 6003 /** FleetAlreadyRented: Fleet is already rented. Wait for current rental to end or be cancelled. */ export const SRSLY_ERROR__FLEET_ALREADY_RENTED = 0x1774; // 6004 /** InvalidRate: Invalid rental rate. Rate must be greater than or equal to 0 ATLAS. */ export const SRSLY_ERROR__INVALID_RATE = 0x1775; // 6005 /** InvalidPaymentFrequency: Invalid payment frequency. Must be one of the allowed frequencies configured in the program. */ export const SRSLY_ERROR__INVALID_PAYMENT_FREQUENCY = 0x1776; // 6006 /** InsufficientCancellationNotice: Insufficient cancellation notice. Must cancel at least one payment period before rental ends. */ export const SRSLY_ERROR__INSUFFICIENT_CANCELLATION_NOTICE = 0x1777; // 6007 /** DelayExceedsTimeRemaining: Cancellation delay exceeds time remaining. cancel_delay must be <= time remaining until rental ends. */ export const SRSLY_ERROR__DELAY_EXCEEDS_TIME_REMAINING = 0x1778; // 6008 /** ContractClosed: Contract is closed and no longer accepts rentals. Find another available fleet. */ export const SRSLY_ERROR__CONTRACT_CLOSED = 0x1779; // 6009 /** InvalidThreadContext: Thread has invalid execution context. Thread may have been corrupted or incorrectly initialized. */ export const SRSLY_ERROR__INVALID_THREAD_CONTEXT = 0x177a; // 6010 /** RentalIsActive: Rental is still active. Wait for it to expire or use rental_cancel to end early. */ export const SRSLY_ERROR__RENTAL_IS_ACTIVE = 0x177b; // 6011 /** RentalStateExists: Rental state still exists. Cannot reset fleet until rental state is properly closed. */ export const SRSLY_ERROR__RENTAL_STATE_EXISTS = 0x177c; // 6012 /** InvalidFeeRate: Invalid fee rate. Service fee must be <= 10% (1000 bps), base_bps must be > 0. */ export const SRSLY_ERROR__INVALID_FEE_RATE = 0x177d; // 6013 /** InvalidRentalDuration: Invalid rental duration. Min >= 1 hour, max >= min, max <= 3 months. */ export const SRSLY_ERROR__INVALID_RENTAL_DURATION = 0x177e; // 6014 /** UnauthorizedConfigUpdate: Only the config authority can update settings. Check the authority address. */ export const SRSLY_ERROR__UNAUTHORIZED_CONFIG_UPDATE = 0x177f; // 6015 /** InvalidAtlasConversionRate: Invalid ATLAS conversion rate. Must be greater than 0 (typically 100,000,000 for 1 ATLAS). */ export const SRSLY_ERROR__INVALID_ATLAS_CONVERSION_RATE = 0x1780; // 6016 /** AccountOwnedByWrongProgram: Account is owned by a different program than expected. Check account initialization. */ export const SRSLY_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM = 0x1781; // 6017 /** InvalidDurationMinimumAlignment: Duration minimum must be a multiple of the payment frequency (e.g., daily = 86400 seconds). */ export const SRSLY_ERROR__INVALID_DURATION_MINIMUM_ALIGNMENT = 0x1782; // 6018 /** InvalidDurationMaximumAlignment: Duration maximum must be a multiple of the payment frequency (e.g., daily = 86400 seconds). */ export const SRSLY_ERROR__INVALID_DURATION_MAXIMUM_ALIGNMENT = 0x1783; // 6019 /** RentalExpired: Rental has expired. Use rental_close instruction to process final payment and clean up. */ export const SRSLY_ERROR__RENTAL_EXPIRED = 0x1784; // 6020 /** InvalidThread: Thread account does not match the rental state's thread reference. Use the correct thread. */ export const SRSLY_ERROR__INVALID_THREAD = 0x1785; // 6021 /** RentalAlreadyCancelled: Rental has already been cancelled. No further action needed. */ export const SRSLY_ERROR__RENTAL_ALREADY_CANCELLED = 0x1786; // 6022 /** InvalidStarbase: Invalid starbase - doesn't match stored value in rental state. */ export const SRSLY_ERROR__INVALID_STARBASE = 0x1787; // 6023 /** InvalidStarbasePlayer: Invalid starbase player - doesn't match stored value in rental state. */ export const SRSLY_ERROR__INVALID_STARBASE_PLAYER = 0x1788; // 6024 /** InactiveReferrer: Referral is not active */ export const SRSLY_ERROR__INACTIVE_REFERRER = 0x1789; // 6025 /** InvalidAuthority: Invalid authority for this operation */ export const SRSLY_ERROR__INVALID_AUTHORITY = 0x178a; // 6026 /** InvalidSplitPercentages: Payment split percentages must sum to 100% */ export const SRSLY_ERROR__INVALID_SPLIT_PERCENTAGES = 0x178b; // 6027 /** InvalidSplitConfig: Invalid payment split configuration */ export const SRSLY_ERROR__INVALID_SPLIT_CONFIG = 0x178c; // 6028 /** ReferrerAlreadySet: Referrer has already been set and cannot be changed */ export const SRSLY_ERROR__REFERRER_ALREADY_SET = 0x178d; // 6029 /** ExpiredBorrowerStateRequired: Please provide the expired borrower's state */ export const SRSLY_ERROR__EXPIRED_BORROWER_STATE_REQUIRED = 0x178e; // 6030 /** NoReferrerSet: Borrower has not set a referrer */ export const SRSLY_ERROR__NO_REFERRER_SET = 0x178f; // 6031 /** ReferrerMismatch: Referrer does not match borrower's chosen referrer */ export const SRSLY_ERROR__REFERRER_MISMATCH = 0x1790; // 6032 /** InvalidRecipient: Invalid recipient for claim */ export const SRSLY_ERROR__INVALID_RECIPIENT = 0x1791; // 6033 /** NoClaimableBalance: No claimable balance available */ export const SRSLY_ERROR__NO_CLAIMABLE_BALANCE = 0x1792; // 6034 /** InvalidTokenAccount: Invalid token account - same as current */ export const SRSLY_ERROR__INVALID_TOKEN_ACCOUNT = 0x1793; // 6035 /** InvalidOwnerTokenAccount: Owner token account address does not match the address stored in rental state */ export const SRSLY_ERROR__INVALID_OWNER_TOKEN_ACCOUNT = 0x1794; // 6036 /** MissingThreadAccounts: Missing required accounts for thread creation */ export const SRSLY_ERROR__MISSING_THREAD_ACCOUNTS = 0x1795; // 6037 /** InvalidClaimSchedule: Invalid claim schedule. Must be @daily, @weekly, or @monthly */ export const SRSLY_ERROR__INVALID_CLAIM_SCHEDULE = 0x1796; // 6038 /** InvalidPercentage: Invalid percentage value. Must be <= 10000 basis points (100%) */ export const SRSLY_ERROR__INVALID_PERCENTAGE = 0x1797; // 6039 /** FleetHasActiveReservation: Fleet has an active reservation. Must wait for exclusive window to expire or be the reservation holder. */ export const SRSLY_ERROR__FLEET_HAS_ACTIVE_RESERVATION = 0x1798; // 6040 /** InvalidReservationHolder: Invalid reservation holder specified */ export const SRSLY_ERROR__INVALID_RESERVATION_HOLDER = 0x1799; // 6041 /** ContractNotRented: Contract is not currently rented. Only active rentals can be reserved. */ export const SRSLY_ERROR__CONTRACT_NOT_RENTED = 0x179a; // 6042 /** NotReservationHolder: Not the current reservation holder */ export const SRSLY_ERROR__NOT_RESERVATION_HOLDER = 0x179b; // 6043 /** ExclusiveWindowActive: Exclusive reservation window is active. Cannot process new reservation. */ export const SRSLY_ERROR__EXCLUSIVE_WINDOW_ACTIVE = 0x179c; // 6044 /** InsufficientPointsForClaim: Insufficient points to claim the reservation */ export const SRSLY_ERROR__INSUFFICIENT_POINTS_FOR_CLAIM = 0x179d; // 6045 /** InvalidNonce: Invalid nonce for reservation PDA */ export const SRSLY_ERROR__INVALID_NONCE = 0x179e; // 6046 /** InvalidCloseTarget: Invalid close target for reservation account */ export const SRSLY_ERROR__INVALID_CLOSE_TARGET = 0x179f; // 6047 /** ReservationStillActive: Reservation is still active. Must wait for expiry. */ export const SRSLY_ERROR__RESERVATION_STILL_ACTIVE = 0x17a0; // 6048 /** InsufficientPointsToReserve: Insufficient points to take over the reservation */ export const SRSLY_ERROR__INSUFFICIENT_POINTS_TO_RESERVE = 0x17a1; // 6049 /** InvalidReservationRateMultiplier: Invalid reservation rate multiplier. Must be at least 10000 basis points (100%). */ export const SRSLY_ERROR__INVALID_RESERVATION_RATE_MULTIPLIER = 0x17a2; // 6050 /** ExcessiveReservationRateMultiplier: Excessive reservation rate multiplier. Cannot exceed 20000 basis points (200%). */ export const SRSLY_ERROR__EXCESSIVE_RESERVATION_RATE_MULTIPLIER = 0x17a3; // 6051 /** ReservationsDisabled: Reservation system is disabled */ export const SRSLY_ERROR__RESERVATIONS_DISABLED = 0x17a4; // 6052 /** MissingRequiredAccount: Missing required account for operation */ export const SRSLY_ERROR__MISSING_REQUIRED_ACCOUNT = 0x17a5; // 6053 /** InvalidConfig: Invalid configuration parameter */ export const SRSLY_ERROR__INVALID_CONFIG = 0x17a6; // 6054 /** InvalidDefender: Invalid defender - does not match current reservation holder */ export const SRSLY_ERROR__INVALID_DEFENDER = 0x17a7; // 6055 /** InvalidSplit: Invalid split - split authority not found in payment splits */ export const SRSLY_ERROR__INVALID_SPLIT = 0x17a8; // 6056 /** InvalidReferralRate: Invalid referral rate configuration */ export const SRSLY_ERROR__INVALID_REFERRAL_RATE = 0x17a9; // 6057 /** ReferralNotEnabled: Referrals are not enabled for this split */ export const SRSLY_ERROR__REFERRAL_NOT_ENABLED = 0x17aa; // 6058 /** NoFeesToClaim: No fees available to claim */ export const SRSLY_ERROR__NO_FEES_TO_CLAIM = 0x17ab; // 6059 /** ActiveRentalExist: Cannot close account while active rental(s) exist */ export const SRSLY_ERROR__ACTIVE_RENTAL_EXIST = 0x17ac; // 6060 /** CannotReleaseActiveRental: Cannot release an active rental. Either rental state must be closed or contract must show no active rental. */ export const SRSLY_ERROR__CANNOT_RELEASE_ACTIVE_RENTAL = 0x17ad; // 6061 /** CloseRentalBeforeContract: Cannot close contract while rental is active. Close the rental first using rental_close. */ export const SRSLY_ERROR__CLOSE_RENTAL_BEFORE_CONTRACT = 0x17ae; // 6062 /** InstantCancelNotAllowed: Instant cancellation not allowed for this contract. Owner must enable allow_instant_cancel. */ export const SRSLY_ERROR__INSTANT_CANCEL_NOT_ALLOWED = 0x17af; // 6063 /** CancelNotAllowed: Cancel delay equals time remaining — cancellation would have no effect. */ export const SRSLY_ERROR__CANCEL_NOT_ALLOWED = 0x17b0; // 6064 /** ContractReservationsDisabled: Reservations disabled for this contract. Owner has opted out of reservation system. */ export const SRSLY_ERROR__CONTRACT_RESERVATIONS_DISABLED = 0x17b1; // 6065 /** AtlasReservationRequiresTokenAccounts: ATLAS reservation requires token accounts */ export const SRSLY_ERROR__ATLAS_RESERVATION_REQUIRES_TOKEN_ACCOUNTS = 0x17b2; // 6066 /** InvalidAtlasAmount: Invalid ATLAS amount for reservation (must be > 0) */ export const SRSLY_ERROR__INVALID_ATLAS_AMOUNT = 0x17b3; // 6067 /** ContractExists: Contract exists for this fleet. Use rental_release instead of rental_invalidate. */ export const SRSLY_ERROR__CONTRACT_EXISTS = 0x17b4; // 6068 /** FleetNotRented: Fleet is not currently rented (sub_profile is empty). */ export const SRSLY_ERROR__FLEET_NOT_RENTED = 0x17b5; // 6069 /** NotCrownedWinner: Not the crowned winner. Only the winner from reservation can claim during the claim window. */ export const SRSLY_ERROR__NOT_CROWNED_WINNER = 0x17b6; // 6070 /** ClaimWindowExpired: Claim window has expired. Fleet is now available for anyone via rental_accept. */ export const SRSLY_ERROR__CLAIM_WINDOW_EXPIRED = 0x17b7; // 6071 /** QueueFull: Queue is full. Both rental slots are occupied. Wait for current rental to close. */ export const SRSLY_ERROR__QUEUE_FULL = 0x17b8; // 6072 /** AlreadyScheduled: Thread already scheduled for this rental. Cannot schedule again. */ export const SRSLY_ERROR__ALREADY_SCHEDULED = 0x17b9; // 6073 /** NoActiveRental: No active rental exists. Use rental_accept instead of rental_claim. */ export const SRSLY_ERROR__NO_ACTIVE_RENTAL = 0x17ba; // 6074 /** ThreadNotScheduled: Thread not scheduled. Call rental_schedule first or use manual payment mode. */ export const SRSLY_ERROR__THREAD_NOT_SCHEDULED = 0x17bb; // 6075 /** InvalidRentalState: Invalid rental state. The provided rental is not tracked by this contract. */ export const SRSLY_ERROR__INVALID_RENTAL_STATE = 0x17bc; // 6076 /** InvalidRentalSlot: Invalid rental slot. Passed slot does not match expected free slot. */ export const SRSLY_ERROR__INVALID_RENTAL_SLOT = 0x17bd; // 6077 /** RentalNotQueued: Rental is not in Queued status. Only Queued rentals can be activated. */ export const SRSLY_ERROR__RENTAL_NOT_QUEUED = 0x17be; // 6078 /** PreviousRentalActive: Previous rental slot is still active. Wait for it to be closed first. */ export const SRSLY_ERROR__PREVIOUS_RENTAL_ACTIVE = 0x17bf; // 6079 /** InvalidVault: Invalid vault address. Does not match config.slyvault. */ export const SRSLY_ERROR__INVALID_VAULT = 0x17c0; // 6080 /** InsufficientAtlasForRefund: Insufficient ATLAS in contract to refund reservation. Owner must fund contract first. */ export const SRSLY_ERROR__INSUFFICIENT_ATLAS_FOR_REFUND = 0x17c1; // 6081 /** ContractPendingClose: Contract is pending close. No new rentals or reservations allowed. */ export const SRSLY_ERROR__CONTRACT_PENDING_CLOSE = 0x17c2; // 6082 /** InvalidReferrer: Referrer account does not match stored referrer on rental state. */ export const SRSLY_ERROR__INVALID_REFERRER = 0x17c3; // 6083 /** ThreadStillExists: Thread still exists. Close thread first using close_contract_thread. */ export const SRSLY_ERROR__THREAD_STILL_EXISTS = 0x17c4; // 6084 /** InsufficientThreadFunding: Insufficient SOL for thread creation. Minimum 0.04 SOL required for 3 fibers + thread rent. */ export const SRSLY_ERROR__INSUFFICIENT_THREAD_FUNDING = 0x17c5; // 6085 /** InvalidDiscountContext: Discount authorization context does not match contract */ export const SRSLY_ERROR__INVALID_DISCOUNT_CONTEXT = 0x17c6; // 6086 /** AtlasBidRequired: ATLAS bid required to knock off an ATLAS reservation */ export const SRSLY_ERROR__ATLAS_BID_REQUIRED = 0x17c7; // 6087 /** InsufficientBid: Bid is insufficient to knock off the current reservation */ export const SRSLY_ERROR__INSUFFICIENT_BID = 0x17c8; // 6088 /** BidRequired: A non-zero bid is required to knock off an existing reservation */ export const SRSLY_ERROR__BID_REQUIRED = 0x17c9; // 6089 /** PointsOrAtlasBidOnly: Bid must be either points or ATLAS, not both */ export const SRSLY_ERROR__POINTS_OR_ATLAS_BID_ONLY = 0x17ca; // 6090 /** DiscountNotLocked: Discount must be locked before it can be used in activation */ export const SRSLY_ERROR__DISCOUNT_NOT_LOCKED = 0x17cb; // 6091 /** MissingReferrer: Referrer account required when discount params are provided */ export const SRSLY_ERROR__MISSING_REFERRER = 0x17cc; // 6092 /** OwnerCannotRent: Owner cannot rent their own fleet */ export const SRSLY_ERROR__OWNER_CANNOT_RENT = 0x17cd; // 6093 let srslyErrorMessages; if (process.env.NODE_ENV !== 'production') { srslyErrorMessages = { [SRSLY_ERROR__ACCOUNT_OWNED_BY_WRONG_PROGRAM]: `Account is owned by a different program than expected. Check account initialization.`, [SRSLY_ERROR__ACTIVE_RENTAL_EXIST]: `Cannot close account while active rental(s) exist`, [SRSLY_ERROR__ALREADY_SCHEDULED]: `Thread already scheduled for this rental. Cannot schedule again.`, [SRSLY_ERROR__ATLAS_BID_REQUIRED]: `ATLAS bid required to knock off an ATLAS reservation`, [SRSLY_ERROR__ATLAS_RESERVATION_REQUIRES_TOKEN_ACCOUNTS]: `ATLAS reservation requires token accounts`, [SRSLY_ERROR__BID_REQUIRED]: `A non-zero bid is required to knock off an existing reservation`, [SRSLY_ERROR__CANCEL_NOT_ALLOWED]: `Cancel delay equals time remaining — cancellation would have no effect.`, [SRSLY_ERROR__CANNOT_RELEASE_ACTIVE_RENTAL]: `Cannot release an active rental. Either rental state must be closed or contract must show no active rental.`, [SRSLY_ERROR__CLAIM_WINDOW_EXPIRED]: `Claim window has expired. Fleet is now available for anyone via rental_accept.`, [SRSLY_ERROR__CLOSE_RENTAL_BEFORE_CONTRACT]: `Cannot close contract while rental is active. Close the rental first using rental_close.`, [SRSLY_ERROR__CONTRACT_CLOSED]: `Contract is closed and no longer accepts rentals. Find another available fleet.`, [SRSLY_ERROR__CONTRACT_EXISTS]: `Contract exists for this fleet. Use rental_release instead of rental_invalidate.`, [SRSLY_ERROR__CONTRACT_NOT_RENTED]: `Contract is not currently rented. Only active rentals can be reserved.`, [SRSLY_ERROR__CONTRACT_PENDING_CLOSE]: `Contract is pending close. No new rentals or reservations allowed.`, [SRSLY_ERROR__CONTRACT_RESERVATIONS_DISABLED]: `Reservations disabled for this contract. Owner has opted out of reservation system.`, [SRSLY_ERROR__DELAY_EXCEEDS_TIME_REMAINING]: `Cancellation delay exceeds time remaining. cancel_delay must be <= time remaining until rental ends.`, [SRSLY_ERROR__DISCOUNT_NOT_LOCKED]: `Discount must be locked before it can be used in activation`, [SRSLY_ERROR__EXCESSIVE_RESERVATION_RATE_MULTIPLIER]: `Excessive reservation rate multiplier. Cannot exceed 20000 basis points (200%).`, [SRSLY_ERROR__EXCLUSIVE_WINDOW_ACTIVE]: `Exclusive reservation window is active. Cannot process new reservation.`, [SRSLY_ERROR__EXPIRED_BORROWER_STATE_REQUIRED]: `Please provide the expired borrower's state`, [SRSLY_ERROR__FLEET_ALREADY_RENTED]: `Fleet is already rented. Wait for current rental to end or be cancelled.`, [SRSLY_ERROR__FLEET_HAS_ACTIVE_RESERVATION]: `Fleet has an active reservation. Must wait for exclusive window to expire or be the reservation holder.`, [SRSLY_ERROR__FLEET_NOT_RENTED]: `Fleet is not currently rented (sub_profile is empty).`, [SRSLY_ERROR__INACTIVE_REFERRER]: `Referral is not active`, [SRSLY_ERROR__INSTANT_CANCEL_NOT_ALLOWED]: `Instant cancellation not allowed for this contract. Owner must enable allow_instant_cancel.`, [SRSLY_ERROR__INSUFFICIENT_ATLAS_FOR_REFUND]: `Insufficient ATLAS in contract to refund reservation. Owner must fund contract first.`, [SRSLY_ERROR__INSUFFICIENT_BID]: `Bid is insufficient to knock off the current reservation`, [SRSLY_ERROR__INSUFFICIENT_CANCELLATION_NOTICE]: `Insufficient cancellation notice. Must cancel at least one payment period before rental ends.`, [SRSLY_ERROR__INSUFFICIENT_POINTS_FOR_CLAIM]: `Insufficient points to claim the reservation`, [SRSLY_ERROR__INSUFFICIENT_POINTS_TO_RESERVE]: `Insufficient points to take over the reservation`, [SRSLY_ERROR__INSUFFICIENT_THREAD_FUNDING]: `Insufficient SOL for thread creation. Minimum 0.04 SOL required for 3 fibers + thread rent.`, [SRSLY_ERROR__INVALID_ATLAS_AMOUNT]: `Invalid ATLAS amount for reservation (must be > 0)`, [SRSLY_ERROR__INVALID_ATLAS_CONVERSION_RATE]: `Invalid ATLAS conversion rate. Must be greater than 0 (typically 100,000,000 for 1 ATLAS).`, [SRSLY_ERROR__INVALID_AUTHORITY]: `Invalid authority for this operation`, [SRSLY_ERROR__INVALID_CLAIM_SCHEDULE]: `Invalid claim schedule. Must be @daily, @weekly, or @monthly`, [SRSLY_ERROR__INVALID_CLOSE_TARGET]: `Invalid close target for reservation account`, [SRSLY_ERROR__INVALID_CONFIG]: `Invalid configuration parameter`, [SRSLY_ERROR__INVALID_DEFENDER]: `Invalid defender - does not match current reservation holder`, [SRSLY_ERROR__INVALID_DISCOUNT_CONTEXT]: `Discount authorization context does not match contract`, [SRSLY_ERROR__INVALID_DURATION_MAXIMUM]: `Invalid duration maximum. Must be greater than or equal to duration minimum and less than config maximum.`, [SRSLY_ERROR__INVALID_DURATION_MAXIMUM_ALIGNMENT]: `Duration maximum must be a multiple of the payment frequency (e.g., daily = 86400 seconds).`, [SRSLY_ERROR__INVALID_DURATION_MINIMUM]: `Invalid duration minimum. Must be between configured minimum and the contract's duration maximum.`, [SRSLY_ERROR__INVALID_DURATION_MINIMUM_ALIGNMENT]: `Duration minimum must be a multiple of the payment frequency (e.g., daily = 86400 seconds).`, [SRSLY_ERROR__INVALID_FEE_RATE]: `Invalid fee rate. Service fee must be <= 10% (1000 bps), base_bps must be > 0.`, [SRSLY_ERROR__INVALID_NONCE]: `Invalid nonce for reservation PDA`, [SRSLY_ERROR__INVALID_OWNER_TOKEN_ACCOUNT]: `Owner token account address does not match the address stored in rental state`, [SRSLY_ERROR__INVALID_PAYMENT_FREQUENCY]: `Invalid payment frequency. Must be one of the allowed frequencies configured in the program.`, [SRSLY_ERROR__INVALID_PERCENTAGE]: `Invalid percentage value. Must be <= 10000 basis points (100%)`, [SRSLY_ERROR__INVALID_RATE]: `Invalid rental rate. Rate must be greater than or equal to 0 ATLAS.`, [SRSLY_ERROR__INVALID_RATE_CALCULATION]: `Invalid payment amount (rate * payment periods). Check your calculation.`, [SRSLY_ERROR__INVALID_RECIPIENT]: `Invalid recipient for claim`, [SRSLY_ERROR__INVALID_REFERRAL_RATE]: `Invalid referral rate configuration`, [SRSLY_ERROR__INVALID_REFERRER]: `Referrer account does not match stored referrer on rental state.`, [SRSLY_ERROR__INVALID_RENTAL_DURATION]: `Invalid rental duration. Min >= 1 hour, max >= min, max <= 3 months.`, [SRSLY_ERROR__INVALID_RENTAL_SLOT]: `Invalid rental slot. Passed slot does not match expected free slot.`, [SRSLY_ERROR__INVALID_RENTAL_STATE]: `Invalid rental state. The provided rental is not tracked by this contract.`, [SRSLY_ERROR__INVALID_RESERVATION_HOLDER]: `Invalid reservation holder specified`, [SRSLY_ERROR__INVALID_RESERVATION_RATE_MULTIPLIER]: `Invalid reservation rate multiplier. Must be at least 10000 basis points (100%).`, [SRSLY_ERROR__INVALID_SPLIT]: `Invalid split - split authority not found in payment splits`, [SRSLY_ERROR__INVALID_SPLIT_CONFIG]: `Invalid payment split configuration`, [SRSLY_ERROR__INVALID_SPLIT_PERCENTAGES]: `Payment split percentages must sum to 100%`, [SRSLY_ERROR__INVALID_STARBASE]: `Invalid starbase - doesn't match stored value in rental state.`, [SRSLY_ERROR__INVALID_STARBASE_PLAYER]: `Invalid starbase player - doesn't match stored value in rental state.`, [SRSLY_ERROR__INVALID_THREAD]: `Thread account does not match the rental state's thread reference. Use the correct thread.`, [SRSLY_ERROR__INVALID_THREAD_CONTEXT]: `Thread has invalid execution context. Thread may have been corrupted or incorrectly initialized.`, [SRSLY_ERROR__INVALID_TOKEN_ACCOUNT]: `Invalid token account - same as current`, [SRSLY_ERROR__INVALID_VAULT]: `Invalid vault address. Does not match config.slyvault.`, [SRSLY_ERROR__MISSING_REFERRER]: `Referrer account required when discount params are provided`, [SRSLY_ERROR__MISSING_REQUIRED_ACCOUNT]: `Missing required account for operation`, [SRSLY_ERROR__MISSING_THREAD_ACCOUNTS]: `Missing required accounts for thread creation`, [SRSLY_ERROR__NO_ACTIVE_RENTAL]: `No active rental exists. Use rental_accept instead of rental_claim.`, [SRSLY_ERROR__NO_CLAIMABLE_BALANCE]: `No claimable balance available`, [SRSLY_ERROR__NO_FEES_TO_CLAIM]: `No fees available to claim`, [SRSLY_ERROR__NO_REFERRER_SET]: `Borrower has not set a referrer`, [SRSLY_ERROR__NOT_CROWNED_WINNER]: `Not the crowned winner. Only the winner from reservation can claim during the claim window.`, [SRSLY_ERROR__NOT_RESERVATION_HOLDER]: `Not the current reservation holder`, [SRSLY_ERROR__OWNER_CANNOT_RENT]: `Owner cannot rent their own fleet`, [SRSLY_ERROR__POINTS_OR_ATLAS_BID_ONLY]: `Bid must be either points or ATLAS, not both`, [SRSLY_ERROR__PREVIOUS_RENTAL_ACTIVE]: `Previous rental slot is still active. Wait for it to be closed first.`, [SRSLY_ERROR__QUEUE_FULL]: `Queue is full. Both rental slots are occupied. Wait for current rental to close.`, [SRSLY_ERROR__REFERRAL_NOT_ENABLED]: `Referrals are not enabled for this split`, [SRSLY_ERROR__REFERRER_ALREADY_SET]: `Referrer has already been set and cannot be changed`, [SRSLY_ERROR__REFERRER_MISMATCH]: `Referrer does not match borrower's chosen referrer`, [SRSLY_ERROR__RENTAL_ALREADY_CANCELLED]: `Rental has already been cancelled. No further action needed.`, [SRSLY_ERROR__RENTAL_EXPIRED]: `Rental has expired. Use rental_close instruction to process final payment and clean up.`, [SRSLY_ERROR__RENTAL_IS_ACTIVE]: `Rental is still active. Wait for it to expire or use rental_cancel to end early.`, [SRSLY_ERROR__RENTAL_NOT_QUEUED]: `Rental is not in Queued status. Only Queued rentals can be activated.`, [SRSLY_ERROR__RENTAL_STATE_EXISTS]: `Rental state still exists. Cannot reset fleet until rental state is properly closed.`, [SRSLY_ERROR__RESERVATIONS_DISABLED]: `Reservation system is disabled`, [SRSLY_ERROR__RESERVATION_STILL_ACTIVE]: `Reservation is still active. Must wait for expiry.`, [SRSLY_ERROR__THREAD_NOT_SCHEDULED]: `Thread not scheduled. Call rental_schedule first or use manual payment mode.`, [SRSLY_ERROR__THREAD_STILL_EXISTS]: `Thread still exists. Close thread first using close_contract_thread.`, [SRSLY_ERROR__UNAUTHORIZED]: `Unauthorized to use this instruction. Check that you have the correct authority.`, [SRSLY_ERROR__UNAUTHORIZED_CONFIG_UPDATE]: `Only the config authority can update settings. Check the authority address.`, }; } export function getSrslyErrorMessage(code) { if (process.env.NODE_ENV !== 'production') { return srslyErrorMessages[code]; } return 'Error message not available in production bundles.'; } export function isSrslyError(error, transactionMessage, code) { return isProgramError(error, transactionMessage, SRSLY_PROGRAM_ADDRESS, code); } //# sourceMappingURL=srsly.js.map