UNPKG

@wuwei-labs/srsly

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