/** Generic SDK error */ export declare class SapError extends Error { constructor(message: string); } /** Validation-specific SDK error */ export declare class SapValidationError extends Error { constructor(message: string); } /** All v0.13 SapError variants with recovery hints */ export declare enum SapErrorCode { NameTooLong = 6000, NameTooShort = 6001, InvalidEndpoint = 6002, EndpointTooLong = 6003, InvalidDIDHash = 6004, AgentNotInitialized = 6005, AgentAlreadyInitialized = 6006, AgentClosed = 6007, NameEmpty = 6010, NameWhitespace = 6011, DescriptionTooLong = 6012, CategoryOutOfRange = 6013, ToolNameExists = 6014, ToolNotFound = 6015, CallerNotAgentOwner = 6016, CallerNotToolOwner = 6017, ToolCategoryMismatch = 6018, StakeBelowMinimum = 6020, NotStaked = 6021, UnstakeTooSoon = 6022, UnstakeExceedsStake = 6023, AlreadyStaked = 6024, UnstakeWindowNotOpen = 6025, UnstakeAlreadyPending = 6026, CannotCloseAgentWithActiveEscrows = 6027, StakeNotFound = 6028, AgentStatsNotFound = 6029, InsufficientStake = 6030, InsufficientEscrowBalance = 6032, EscrowNotFound = 6033, EscrowNotForAgent = 6034, EscrowNotForDepositor = 6035, AmountMustBePositive = 6036, PricePerCallMustBePositive = 6037, InvalidEscrowNonce = 6038, InvalidVolumeCurve = 6039, VolumeCurveNotDescending = 6040, TooManyVolumeCurvePoints = 6041, SettlementNotPending = 6042, SettlementAlreadyFinalized = 6043, DisputeWindowNotExpired = 6044, DisputeWindowExpired = 6045, NotDepositor = 6046, DisputeAlreadyFiled = 6047, DisputeStillOpen = 6048, NotArbiter = 6049, InvalidArbiter = 6050, ArbiterRequired = 6051, CoSignerRequired = 6052, InvalidCoSigner = 6053, InvalidDisputeOutcome = 6054, EscrowEmpty = 6055, EscrowAlreadyExpired = 6056, EscrowExpired = 6057, EscrowNonceReused = 6058, ReceiptBatchNotFound = 6060, ReceiptTreeEmpty = 6061, ReceiptNotFound = 6062, ReceiptAlreadyDisputed = 6063, ReceiptNotInWindow = 6064, InvalidReceiptProof = 6065, InvalidMerkleProof = 6066, NotAgentOwner = 6067, SubscriptionNotFound = 6070, NotSubscriber = 6071, SubscriptionInsufficientBalance = 6072, SubscriptionIntervalOverflow = 6073, SubscriptionDurationTooLong = 6074, PendingAmountMismatch = 6080, MaxCallsPerSettlementExceeded = 6081, InvalidVolumeCurvePrice = 6082, EscrowCoverageExceeded = 6083, CoSignerIsAgentWallet = 6084, PendingSettlementExists = 6085, TokenAccountOwnerMismatch = 6086, MaxReceiptProofExceeded = 6087, MaxMerkleDepthExceeded = 6088, StakeSlashLocksUnstake = 6089, ReceiptProofAlreadySubmitted = 6170, DuplicateReceiptProof = 6171, MissingReceiptSignature = 6172, AgentCapabilityMismatch = 6173, AgentProtocolMismatch = 6174, InvalidToolParameterCount = 6175, ActiveEscrowCounterUnderflow = 6176, ArithmeticOverflow = 6300, VaultNotFound = 6350, VaultAlreadyInitialized = 6351, VaultNotInitialized = 6352, NotVaultOwner = 6353, NotDelegate = 6354, DelegateExpired = 6355, InvalidPermissions = 6356, SessionNotFound = 6357, EpochNotFound = 6358, VaultAlreadyOpen = 6359, InvalidSequence = 6360, FragmentTooLarge = 6361, VaultClosed = 6362, InsufficientVaultBalance = 6363 } export interface SapErrorInfo { code: SapErrorCode; name: string; message: string; recovery: string; } /** Decode an Anchor transaction error into structured info */ export declare function decodeSapError(err: unknown): SapErrorInfo; /** Is this error retryable? */ export declare function isRetryableError(err: SapErrorInfo): boolean; /** Is this a client-side validation error that should have been caught before sending? * If true, the SDK's validate functions have a bug. */ export declare function isClientValidationFailure(err: SapErrorInfo): boolean; //# sourceMappingURL=errors.d.ts.map