@epicentral/sos-sdk 0.14.1-beta → 0.14.2-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -398,6 +398,7 @@ Error codes to watch (see `generated/errors/optionProgram.ts`):
398
398
  - `RescueUnauthorized` (6102) — rescue ix caller is not the vault keeper.
399
399
  - `InvalidLoanRepayment` (6103) — repayment exceeded synced balances (slot race).
400
400
  - `RescuePreconditionsNotMet` (6104) — rescue called on a solvent position.
401
+ - `StaleCanonicalLoanRequiresCleanup` — `option_mint` (leveraged) found the canonical loan (`["pool_loan", writer_position]`) carrying untracked residual principal from an abandoned borrow setup (TX A landed, TX B never completed). Repay the open loan before re-minting; the OPX client auto-repays via `cleanupStaleCanonicalLoanBeforeMint` before the borrow.
401
402
 
402
403
  ## Usage Examples
403
404
 
@@ -240,6 +240,8 @@ export const OPTION_PROGRAM_ERROR__RESCUE_UNAUTHORIZED = 0x17de; // 6110
240
240
  export const OPTION_PROGRAM_ERROR__INVALID_LOAN_REPAYMENT = 0x17df; // 6111
241
241
  /** RescuePreconditionsNotMet: Rescue preconditions not met: collateral_vault must be short of the remaining debt after theta forfeiture */
242
242
  export const OPTION_PROGRAM_ERROR__RESCUE_PRECONDITIONS_NOT_MET = 0x17e0; // 6112
243
+ /** StaleCanonicalLoanRequiresCleanup: Canonical pool loan carries untracked residual principal from an abandoned borrow setup; repay/clean up the open loan before minting */
244
+ export const OPTION_PROGRAM_ERROR__STALE_CANONICAL_LOAN_REQUIRES_CLEANUP = 0x17e1; // 6113
243
245
 
244
246
  export type OptionProgramError =
245
247
  | typeof OPTION_PROGRAM_ERROR__ACCOUNT_FROZEN
@@ -343,6 +345,7 @@ export type OptionProgramError =
343
345
  | typeof OPTION_PROGRAM_ERROR__SETTLEMENT_CLAIM_ALREADY_PREPARED
344
346
  | typeof OPTION_PROGRAM_ERROR__SETTLEMENT_CLAIM_NOT_PREPARED
345
347
  | typeof OPTION_PROGRAM_ERROR__SLIPPAGE_TOLERANCE_EXCEEDED
348
+ | typeof OPTION_PROGRAM_ERROR__STALE_CANONICAL_LOAN_REQUIRES_CLEANUP
346
349
  | typeof OPTION_PROGRAM_ERROR__STALE_MARKET_DATA
347
350
  | typeof OPTION_PROGRAM_ERROR__STALE_ORACLE_PRICE
348
351
  | typeof OPTION_PROGRAM_ERROR__SUPPLY_LIMIT_EXCEEDED
@@ -460,6 +463,7 @@ if (process.env.NODE_ENV !== "production") {
460
463
  [OPTION_PROGRAM_ERROR__SETTLEMENT_CLAIM_ALREADY_PREPARED]: `Settlement claim has already been prepared`,
461
464
  [OPTION_PROGRAM_ERROR__SETTLEMENT_CLAIM_NOT_PREPARED]: `Settlement claim has not been prepared`,
462
465
  [OPTION_PROGRAM_ERROR__SLIPPAGE_TOLERANCE_EXCEEDED]: `Slippage tolerance exceeded`,
466
+ [OPTION_PROGRAM_ERROR__STALE_CANONICAL_LOAN_REQUIRES_CLEANUP]: `Canonical pool loan carries untracked residual principal from an abandoned borrow setup; repay/clean up the open loan before minting`,
463
467
  [OPTION_PROGRAM_ERROR__STALE_MARKET_DATA]: `Market data is stale and needs to be updated`,
464
468
  [OPTION_PROGRAM_ERROR__STALE_ORACLE_PRICE]: `Oracle price is too old`,
465
469
  [OPTION_PROGRAM_ERROR__SUPPLY_LIMIT_EXCEEDED]: `Deposit would exceed vault supply limit`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epicentral/sos-sdk",
3
- "version": "0.14.1-beta",
3
+ "version": "0.14.2-beta",
4
4
  "private": false,
5
5
  "description": "Solana Option Standard SDK. The frontend-first SDK for Native Options Trading on Solana. Created by Epicentral Labs.",
6
6
  "type": "module",