@velocity-exchange/sdk 0.9.0 → 0.11.0

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.
Files changed (74) hide show
  1. package/lib/browser/adminClient.d.ts +4 -3
  2. package/lib/browser/adminClient.js +5 -13
  3. package/lib/browser/equityFloorManager.d.ts +9 -5
  4. package/lib/browser/equityFloorManager.js +9 -5
  5. package/lib/browser/idl/velocity.d.ts +119 -3
  6. package/lib/browser/idl/velocity.json +119 -3
  7. package/lib/browser/index.d.ts +2 -0
  8. package/lib/browser/index.js +3 -0
  9. package/lib/browser/jupiter/jupiterClient.d.ts +31 -27
  10. package/lib/browser/jupiter/jupiterClient.js +61 -35
  11. package/lib/browser/math/amm.d.ts +6 -5
  12. package/lib/browser/math/amm.js +39 -19
  13. package/lib/browser/math/margin.d.ts +12 -10
  14. package/lib/browser/math/margin.js +16 -14
  15. package/lib/browser/math/superStake.d.ts +9 -9
  16. package/lib/browser/math/superStake.js +8 -8
  17. package/lib/browser/swap/UnifiedSwapClient.d.ts +38 -76
  18. package/lib/browser/swap/UnifiedSwapClient.js +46 -117
  19. package/lib/browser/swap/routeInstructions.d.ts +19 -0
  20. package/lib/browser/swap/routeInstructions.js +43 -0
  21. package/lib/browser/swap/types.d.ts +196 -0
  22. package/lib/browser/swap/types.js +88 -0
  23. package/lib/browser/titan/titanClient.d.ts +32 -68
  24. package/lib/browser/titan/titanClient.js +128 -102
  25. package/lib/browser/types.d.ts +2 -0
  26. package/lib/browser/user.d.ts +16 -18
  27. package/lib/browser/user.js +24 -26
  28. package/lib/browser/velocityClient.d.ts +122 -101
  29. package/lib/browser/velocityClient.js +221 -289
  30. package/lib/node/adminClient.d.ts +4 -3
  31. package/lib/node/adminClient.d.ts.map +1 -1
  32. package/lib/node/adminClient.js +5 -13
  33. package/lib/node/equityFloorManager.d.ts +9 -5
  34. package/lib/node/equityFloorManager.d.ts.map +1 -1
  35. package/lib/node/equityFloorManager.js +9 -5
  36. package/lib/node/idl/velocity.d.ts +119 -3
  37. package/lib/node/idl/velocity.d.ts.map +1 -1
  38. package/lib/node/idl/velocity.json +119 -3
  39. package/lib/node/index.d.ts +2 -0
  40. package/lib/node/index.d.ts.map +1 -1
  41. package/lib/node/index.js +3 -0
  42. package/lib/node/jupiter/jupiterClient.d.ts +31 -27
  43. package/lib/node/jupiter/jupiterClient.d.ts.map +1 -1
  44. package/lib/node/jupiter/jupiterClient.js +61 -35
  45. package/lib/node/math/amm.d.ts +6 -5
  46. package/lib/node/math/amm.d.ts.map +1 -1
  47. package/lib/node/math/amm.js +39 -19
  48. package/lib/node/math/margin.d.ts +12 -10
  49. package/lib/node/math/margin.d.ts.map +1 -1
  50. package/lib/node/math/margin.js +16 -14
  51. package/lib/node/math/superStake.d.ts +9 -9
  52. package/lib/node/math/superStake.d.ts.map +1 -1
  53. package/lib/node/math/superStake.js +8 -8
  54. package/lib/node/swap/UnifiedSwapClient.d.ts +38 -76
  55. package/lib/node/swap/UnifiedSwapClient.d.ts.map +1 -1
  56. package/lib/node/swap/UnifiedSwapClient.js +46 -117
  57. package/lib/node/swap/routeInstructions.d.ts +20 -0
  58. package/lib/node/swap/routeInstructions.d.ts.map +1 -0
  59. package/lib/node/swap/routeInstructions.js +43 -0
  60. package/lib/node/swap/types.d.ts +197 -0
  61. package/lib/node/swap/types.d.ts.map +1 -0
  62. package/lib/node/swap/types.js +88 -0
  63. package/lib/node/titan/titanClient.d.ts +32 -68
  64. package/lib/node/titan/titanClient.d.ts.map +1 -1
  65. package/lib/node/titan/titanClient.js +128 -102
  66. package/lib/node/types.d.ts +2 -0
  67. package/lib/node/types.d.ts.map +1 -1
  68. package/lib/node/user.d.ts +16 -18
  69. package/lib/node/user.d.ts.map +1 -1
  70. package/lib/node/user.js +24 -26
  71. package/lib/node/velocityClient.d.ts +122 -101
  72. package/lib/node/velocityClient.d.ts.map +1 -1
  73. package/lib/node/velocityClient.js +221 -289
  74. package/package.json +1 -1
@@ -410,14 +410,15 @@ export declare class User {
410
410
  */
411
411
  getTotalCollateral(marginCategory?: MarginCategory, strict?: boolean, includeOpenOrders?: boolean, liquidationBuffer?: BN, perpMarketIndex?: number): BN;
412
412
  /**
413
- * True when the account has an admin-set `equityFloor` and its cross-margin
414
- * total collateral is below it. This is the trip threshold of the
415
- * permissionless `tripEquityFloorBreaker`; action gating happens at
416
- * `equityFloor + equityFloorBuffer` (see `isBelowBufferedEquityFloor`).
417
- * Mirrors `User::is_below_equity_floor` on-chain.
418
- * @param strict Use TWAP-bounded oracle pricing, matching the withdraw path. Defaults to false.
413
+ * True when the account has an admin-set `equityFloor` and its net equity
414
+ * (`getNetUsdValue`: unweighted assets and perp PnL minus unweighted spot
415
+ * liabilities, at live oracle prices) is below it. This is the trip
416
+ * threshold of the permissionless `tripEquityFloorBreaker`; action gating
417
+ * happens at `equityFloor + equityFloorBuffer` (see
418
+ * `isBelowBufferedEquityFloor`). Mirrors `User::is_below_equity_floor`
419
+ * onchain.
419
420
  */
420
- isBelowEquityFloor(strict?: boolean): boolean;
421
+ isBelowEquityFloor(): boolean;
421
422
  /**
422
423
  * The equity required by risk-increasing actions:
423
424
  * `equityFloor + equityFloorBuffer` (QUOTE_PRECISION). Mirrors
@@ -426,31 +427,28 @@ export declare class User {
426
427
  */
427
428
  getBufferedEquityFloor(): BN;
428
429
  /**
429
- * True when the account has an admin-set `equityFloor` and its cross-margin
430
- * total collateral is below `equityFloor + equityFloorBuffer`. While below,
431
- * the program rejects risk-increasing order placement and fills,
430
+ * True when the account has an admin-set `equityFloor` and its net equity
431
+ * (`getNetUsdValue`) is below `equityFloor + equityFloorBuffer`. While
432
+ * below, the program rejects risk-increasing order placement and fills,
432
433
  * withdrawals, and transfers out of the account (`EquityBelowFloor`);
433
434
  * reduce-only activity stays allowed. Mirrors
434
435
  * `User::is_below_buffered_equity_floor` on-chain.
435
- * @param strict Use TWAP-bounded oracle pricing, matching the withdraw path. Defaults to false.
436
436
  */
437
- isBelowBufferedEquityFloor(strict?: boolean): boolean;
437
+ isBelowBufferedEquityFloor(): boolean;
438
438
  /**
439
- * Cross-margin total collateral in excess of the admin-set `equityFloor`,
439
+ * Net equity (`getNetUsdValue`) in excess of the admin-set `equityFloor`,
440
440
  * floored at zero (QUOTE_PRECISION). Unbounded (`null`) when no floor is set.
441
441
  * This is headroom above the trip threshold; headroom above the level
442
442
  * risk-increasing actions must clear is `getEquityAboveBufferedFloor`.
443
- * @param strict Use TWAP-bounded oracle pricing. Defaults to false.
444
443
  */
445
- getEquityAboveFloor(strict?: boolean): BN | null;
444
+ getEquityAboveFloor(): BN | null;
446
445
  /**
447
- * Cross-margin total collateral in excess of `equityFloor +
446
+ * Net equity (`getNetUsdValue`) in excess of `equityFloor +
448
447
  * equityFloorBuffer`, floored at zero (QUOTE_PRECISION). Unbounded
449
448
  * (`null`) when no floor is set. When this reaches zero, risk-increasing
450
449
  * actions start rejecting.
451
- * @param strict Use TWAP-bounded oracle pricing. Defaults to false.
452
450
  */
453
- getEquityAboveBufferedFloor(strict?: boolean): BN | null;
451
+ getEquityAboveBufferedFloor(): BN | null;
454
452
  /**
455
453
  * Builds the liquidation-buffer map to pass into margin calculations while
456
454
  * a liquidation is in progress: `'cross'` is set to the state account's
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/user.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,kBAAkB,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACN,eAAe,EACf,gBAAgB,EAEhB,cAAc,EACd,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,YAAY,EAEZ,YAAY,EACZ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,yBAAyB,EACzB,MAAM,SA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.js CHANGED
@@ -897,19 +897,20 @@ class User {
897
897
  return marginCalc.totalCollateral;
898
898
  }
899
899
  /**
900
- * True when the account has an admin-set `equityFloor` and its cross-margin
901
- * total collateral is below it. This is the trip threshold of the
902
- * permissionless `tripEquityFloorBreaker`; action gating happens at
903
- * `equityFloor + equityFloorBuffer` (see `isBelowBufferedEquityFloor`).
904
- * Mirrors `User::is_below_equity_floor` on-chain.
905
- * @param strict Use TWAP-bounded oracle pricing, matching the withdraw path. Defaults to false.
906
- */
907
- isBelowEquityFloor(strict = false) {
900
+ * True when the account has an admin-set `equityFloor` and its net equity
901
+ * (`getNetUsdValue`: unweighted assets and perp PnL minus unweighted spot
902
+ * liabilities, at live oracle prices) is below it. This is the trip
903
+ * threshold of the permissionless `tripEquityFloorBreaker`; action gating
904
+ * happens at `equityFloor + equityFloorBuffer` (see
905
+ * `isBelowBufferedEquityFloor`). Mirrors `User::is_below_equity_floor`
906
+ * onchain.
907
+ */
908
+ isBelowEquityFloor() {
908
909
  const equityFloor = this.getUserAccountOrThrow().equityFloor;
909
910
  if (equityFloor.lte(numericConstants_1.ZERO)) {
910
911
  return false;
911
912
  }
912
- return this.getTotalCollateral('Initial', strict).lt(equityFloor);
913
+ return this.getNetUsdValue().lt(equityFloor);
913
914
  }
914
915
  /**
915
916
  * The equity required by risk-increasing actions:
@@ -922,48 +923,45 @@ class User {
922
923
  return userAccount.equityFloor.add(userAccount.equityFloorBuffer);
923
924
  }
924
925
  /**
925
- * True when the account has an admin-set `equityFloor` and its cross-margin
926
- * total collateral is below `equityFloor + equityFloorBuffer`. While below,
927
- * the program rejects risk-increasing order placement and fills,
926
+ * True when the account has an admin-set `equityFloor` and its net equity
927
+ * (`getNetUsdValue`) is below `equityFloor + equityFloorBuffer`. While
928
+ * below, the program rejects risk-increasing order placement and fills,
928
929
  * withdrawals, and transfers out of the account (`EquityBelowFloor`);
929
930
  * reduce-only activity stays allowed. Mirrors
930
931
  * `User::is_below_buffered_equity_floor` on-chain.
931
- * @param strict Use TWAP-bounded oracle pricing, matching the withdraw path. Defaults to false.
932
932
  */
933
- isBelowBufferedEquityFloor(strict = false) {
933
+ isBelowBufferedEquityFloor() {
934
934
  const equityFloor = this.getUserAccountOrThrow().equityFloor;
935
935
  if (equityFloor.lte(numericConstants_1.ZERO)) {
936
936
  return false;
937
937
  }
938
- return this.getTotalCollateral('Initial', strict).lt(this.getBufferedEquityFloor());
938
+ return this.getNetUsdValue().lt(this.getBufferedEquityFloor());
939
939
  }
940
940
  /**
941
- * Cross-margin total collateral in excess of the admin-set `equityFloor`,
941
+ * Net equity (`getNetUsdValue`) in excess of the admin-set `equityFloor`,
942
942
  * floored at zero (QUOTE_PRECISION). Unbounded (`null`) when no floor is set.
943
943
  * This is headroom above the trip threshold; headroom above the level
944
944
  * risk-increasing actions must clear is `getEquityAboveBufferedFloor`.
945
- * @param strict Use TWAP-bounded oracle pricing. Defaults to false.
946
945
  */
947
- getEquityAboveFloor(strict = false) {
946
+ getEquityAboveFloor() {
948
947
  const equityFloor = this.getUserAccountOrThrow().equityFloor;
949
948
  if (equityFloor.lte(numericConstants_1.ZERO)) {
950
949
  return null;
951
950
  }
952
- return anchor_1.BN.max(this.getTotalCollateral('Initial', strict).sub(equityFloor), numericConstants_1.ZERO);
951
+ return anchor_1.BN.max(this.getNetUsdValue().sub(equityFloor), numericConstants_1.ZERO);
953
952
  }
954
953
  /**
955
- * Cross-margin total collateral in excess of `equityFloor +
954
+ * Net equity (`getNetUsdValue`) in excess of `equityFloor +
956
955
  * equityFloorBuffer`, floored at zero (QUOTE_PRECISION). Unbounded
957
956
  * (`null`) when no floor is set. When this reaches zero, risk-increasing
958
957
  * actions start rejecting.
959
- * @param strict Use TWAP-bounded oracle pricing. Defaults to false.
960
958
  */
961
- getEquityAboveBufferedFloor(strict = false) {
959
+ getEquityAboveBufferedFloor() {
962
960
  const equityFloor = this.getUserAccountOrThrow().equityFloor;
963
961
  if (equityFloor.lte(numericConstants_1.ZERO)) {
964
962
  return null;
965
963
  }
966
- return anchor_1.BN.max(this.getTotalCollateral('Initial', strict).sub(this.getBufferedEquityFloor()), numericConstants_1.ZERO);
964
+ return anchor_1.BN.max(this.getNetUsdValue().sub(this.getBufferedEquityFloor()), numericConstants_1.ZERO);
967
965
  }
968
966
  /**
969
967
  * Builds the liquidation-buffer map to pass into margin calculations while
@@ -2429,9 +2427,9 @@ class User {
2429
2427
  const spotMarket = this.velocityClient.getSpotMarketAccountOrThrow(marketIndex);
2430
2428
  // eslint-disable-next-line prefer-const
2431
2429
  let { borrowLimit, withdrawLimit } = (0, spotBalance_2.calculateWithdrawLimit)(spotMarket, nowTs);
2432
- // the withdraw path enforces the equity floor on post-withdraw total
2433
- // collateral, so equity above the floor caps free collateral here
2434
- const equityAboveFloor = this.getEquityAboveFloor(true);
2430
+ // the withdraw path enforces the equity floor on post-withdraw net
2431
+ // equity, so equity above the floor caps free collateral here
2432
+ const equityAboveFloor = this.getEquityAboveFloor();
2435
2433
  if (equityAboveFloor !== null && equityAboveFloor.eq(numericConstants_1.ZERO)) {
2436
2434
  return numericConstants_1.ZERO;
2437
2435
  }
@@ -30,8 +30,8 @@ import { User } from './user';
30
30
  import { UserSubscriptionConfig } from './userConfig';
31
31
  import { VelocityEnv, VelocityProgram } from './config';
32
32
  import { UserStats } from './userStats';
33
- import { JupiterClient, QuoteResponse } from './jupiter/jupiterClient';
34
- import { SwapMode, UnifiedQuoteResponse } from './swap/UnifiedSwapClient';
33
+ import { JupiterClient, JupiterSwapQuote } from './jupiter/jupiterClient';
34
+ import { SwapMode, SwapProvider, SwapQuote } from './swap/types';
35
35
  import { UserStatsSubscriptionConfig } from './userStatsConfig';
36
36
  import { TxHandler } from './tx/txHandler';
37
37
  import { SignedMsgOrderParams } from './types';
@@ -39,7 +39,6 @@ import { TakerInfo } from './types';
39
39
  import { ConstituentMap } from './constituentMap/constituentMap';
40
40
  import { RevenueShareEscrowMap } from './userMap/revenueShareEscrowMap';
41
41
  import { TitanClient } from './titan/titanClient';
42
- import { UnifiedSwapClient } from './swap/UnifiedSwapClient';
43
42
  /**
44
43
  * Union type for swap clients (Titan and Jupiter) - Legacy type
45
44
  * @deprecated Use UnifiedSwapClient class instead
@@ -451,6 +450,45 @@ export declare class VelocityClient {
451
450
  * @returns The resize instruction.
452
451
  */
453
452
  getResizeSignedMsgUserOrdersInstruction(authority: PublicKey, numOrders: number): Promise<TransactionInstruction>;
453
+ /**
454
+ * Grows a zero-copy account (User, PerpMarket, SpotMarket, State, ...) to the size the
455
+ * deployed program compiles in for its type, as part of an account-size migration after a
456
+ * program upgrade that appended fields. Requires `HotRole.AccountExtension` (cold, warm, or
457
+ * the configured account-extension hot key) — the wallet must hold that role. The payer
458
+ * covers the rent-exempt shortfall and the program zero-fills the new tail. No-op when the
459
+ * account is already at size, so cranking is idempotent. See `docs/ACCOUNT-EXTENSION.md`.
460
+ * @param account - The account to extend.
461
+ * @param txParams - Optional compute-unit/priority-fee overrides for the transaction.
462
+ * @returns The transaction signature.
463
+ */
464
+ extendAccount(account: PublicKey, txParams?: TxParams): Promise<TransactionSignature>;
465
+ /**
466
+ * Builds the `extendAccount` instruction. See `extendAccount` for semantics.
467
+ * @param account - The account to extend.
468
+ * @param payer - Rent payer; defaults to the wallet.
469
+ * @param authority - `HotRole.AccountExtension` holder; defaults to the wallet.
470
+ * @returns The extend instruction.
471
+ */
472
+ getExtendAccountIx(account: PublicKey, payer?: PublicKey, authority?: PublicKey): Promise<TransactionInstruction>;
473
+ /**
474
+ * Devnet/test only: grows a zero-copy account to an arbitrary larger size, simulating the
475
+ * state right after a struct-growing program upgrade. Requires `HotRole.AccountExtension`
476
+ * like `extendAccount`. The instruction is compiled out of mainnet program builds.
477
+ * @param account - The account to extend.
478
+ * @param newLen - Target account data length in bytes (must be >= the current length).
479
+ * @param txParams - Optional compute-unit/priority-fee overrides for the transaction.
480
+ * @returns The transaction signature.
481
+ */
482
+ extendAccountDevnet(account: PublicKey, newLen: number, txParams?: TxParams): Promise<TransactionSignature>;
483
+ /**
484
+ * Builds the `extendAccountDevnet` instruction. See `extendAccountDevnet` for semantics.
485
+ * @param account - The account to extend.
486
+ * @param newLen - Target account data length in bytes.
487
+ * @param payer - Rent payer; defaults to the wallet.
488
+ * @param authority - `HotRole.AccountExtension` holder; defaults to the wallet.
489
+ * @returns The extend instruction.
490
+ */
491
+ getExtendAccountDevnetIx(account: PublicKey, newLen: number, payer?: PublicKey, authority?: PublicKey): Promise<TransactionInstruction>;
454
492
  /**
455
493
  * Initializes `authority`'s `SignedMsgWsDelegates` account, which lists wallets authorized to
456
494
  * co-sign/relay that authority's signed-message ("swift") orders over a websocket connection
@@ -1573,16 +1611,19 @@ export declare class VelocityClient {
1573
1611
  * @param fromSubAccountId - Sub-account id to debit.
1574
1612
  * @param toSubAccountId - Sub-account id to credit.
1575
1613
  * @param equityFloorDelta - Equity floor (QUOTE_PRECISION) to move from the debited to the credited
1576
- * sub-account along with the funds, keeping the sum of floors constant. The debited side must not
1614
+ * sub-account along with the funds, keeping the sum of floors constant. A proportional share of
1615
+ * the debited side's `equityFloorBuffer` travels with the floor (rounded up on the debited side,
1616
+ * so shedding the whole floor also sheds the whole buffer; no orphan buffer is left on a
1617
+ * check-disabled sub-account), keeping the sum of buffers constant too. The debited side must not
1577
1618
  * already be below the floor being reduced (a below-floor sub-account cannot shed floor to defuse a
1578
- * pending equity-breaker trip), must stay at/above its reduced floor plus its `equityFloorBuffer`,
1579
- * and the credited side's collateral (after the transfer lands) must back its increased floor plus
1580
- * its own buffer, else the transfer reverts with `InvalidEquityFloorTransfer`. Pass `'auto'`
1619
+ * pending equity-breaker trip), must stay at/above its reduced floor plus its reduced buffer,
1620
+ * and the credited side's net equity (after the transfer lands) must back its increased floor plus
1621
+ * its increased buffer, else the transfer reverts with `InvalidEquityFloorTransfer`. Pass `'auto'`
1581
1622
  * (quote market only) to move the minimal floor needed for the debited side to stay at/above its
1582
- * buffered floor: `max(0, amount - max(0, collateral - (floor + buffer)))`, capped at the debited
1623
+ * buffered floor: `max(0, amount - max(0, netEquity - (floor + buffer)))`, capped at the debited
1583
1624
  * side's floor (see `calculateEquityFloorAutoDelta`). The auto delta never exceeds `amount`, so the
1584
1625
  * credited side stays backed whenever it was before. Client-side pricing can differ slightly from
1585
- * the on-chain strict check at the exact boundary; retry with an explicit padded delta if an
1626
+ * the onchain check at the exact boundary; retry with an explicit padded delta if an
1586
1627
  * `'auto'` transfer reverts. Defaults to zero.
1587
1628
  * @param txParams - Optional compute-unit/priority-fee overrides for the transaction.
1588
1629
  * @returns The transaction signature.
@@ -2305,34 +2346,32 @@ export declare class VelocityClient {
2305
2346
  * instructions in a single transaction, so the swap is settled directly against the user's
2306
2347
  * deposits/vault balances rather than the wallet's own token accounts. Sends and confirms the
2307
2348
  * transaction.
2308
- * @param swapClient - Swap client used to fetch routes/instructions (`UnifiedSwapClient` or a
2309
- * `TitanClient`); dispatches to `getSwapIxV2` or `getTitanSwapIx` respectively.
2310
- * @param jupiterClient - @deprecated Use `swapClient` instead. When passed (and `swapClient` is
2311
- * not), dispatches to `getJupiterSwapIxV6`.
2349
+ * @param swapClient - Provider used to quote the swap and build its route: a
2350
+ * `UnifiedSwapClient`, or a `TitanClient`/`JupiterClient` directly. See `getProviderSwapIx`.
2351
+ * @param jupiterClient - @deprecated Use `swapClient` instead. Used only when `swapClient` is
2352
+ * not passed.
2312
2353
  * @param outMarketIndex - Spot market index of the token being bought.
2313
2354
  * @param inMarketIndex - Spot market index of the token being sold.
2314
2355
  * @param outAssociatedTokenAccount - Token account to receive the bought token; created
2315
2356
  * idempotently if omitted.
2316
2357
  * @param inAssociatedTokenAccount - Token account to source the sold token from; created
2317
2358
  * idempotently if omitted.
2318
- * @param amount - Amount of the "in" token (or "out" token when `swapMode` is `ExactOut`, in
2319
- * which case this is the desired output amount), in the token's own mint decimals — not a
2320
- * fixed protocol precision.
2359
+ * @param amount - Amount of the "in" token (or "out" token when the effective mode is
2360
+ * `ExactOut`, in which case this is the desired output amount), in the token's own mint
2361
+ * decimals — not a fixed protocol precision.
2321
2362
  * @param slippageBps - Max slippage in basis points passed to the swap provider's routing API.
2322
- * @param swapMode - `ExactIn` (default) or `ExactOut`.
2363
+ * @param swapMode - `ExactIn` (default) or `ExactOut`. Ignored when `quote` is passed — the
2364
+ * quote's own mode wins.
2323
2365
  * @param reduceOnly - Whether the in/out token's position on the velocity account must reduce
2324
2366
  * (not flip sign); enforced by `endSwap` after the swap completes.
2325
- * @param v6 - @deprecated Use `quote` instead. Pre-fetched Jupiter v6 quote response.
2326
- * @param quote - Pre-fetched quote response (skips an extra round-trip to the swap provider).
2367
+ * @param quote - Pre-fetched quote (skips an extra round-trip to the swap provider). Must be
2368
+ * for this pair and this `amount`.
2327
2369
  * @param txParams - Optional compute-unit/priority-fee overrides.
2328
- * @throws If neither `swapClient` nor `jupiterClient` is provided, or if `swapClient` is not a
2329
- * recognized client type.
2370
+ * @throws If neither `swapClient` nor `jupiterClient` is provided.
2330
2371
  * @returns The transaction signature.
2331
2372
  */
2332
- swap({ swapClient, jupiterClient, outMarketIndex, inMarketIndex, outAssociatedTokenAccount, inAssociatedTokenAccount, amount, slippageBps, swapMode, reduceOnly, txParams, v6, quote, onlyDirectRoutes, }: {
2333
- swapClient?: UnifiedSwapClient | SwapClient;
2334
- /** @deprecated Use swapClient instead. Legacy parameter for backward compatibility */
2335
- jupiterClient?: JupiterClient;
2373
+ swap({ swapClient, outMarketIndex, inMarketIndex, outAssociatedTokenAccount, inAssociatedTokenAccount, amount, slippageBps, swapMode, reduceOnly, txParams, quote, onlyDirectRoutes, }: {
2374
+ swapClient?: SwapProvider;
2336
2375
  outMarketIndex: number;
2337
2376
  inMarketIndex: number;
2338
2377
  outAssociatedTokenAccount?: PublicKey;
@@ -2343,49 +2382,59 @@ export declare class VelocityClient {
2343
2382
  reduceOnly?: SwapReduceOnly;
2344
2383
  txParams?: TxParams;
2345
2384
  onlyDirectRoutes?: boolean;
2346
- v6?: {
2347
- quote?: QuoteResponse;
2348
- };
2349
- quote?: UnifiedQuoteResponse;
2385
+ quote?: SwapQuote;
2350
2386
  }): Promise<TransactionSignature>;
2351
2387
  /**
2352
- * Builds the instruction list for a Titan-routed swap: creates any missing associated token
2353
- * accounts, wraps Titan's routing instructions between `beginSwap`/`endSwap`. See `swap` for
2354
- * parameter semantics; `amount` is in the "in" token's mint decimals.
2355
- * @param userAccountPublicKey - Optional user account override (e.g. when the account is being
2356
- * created in the same transaction and not yet resolvable via `getUserAccountPublicKey`).
2357
- * @returns `ixs` — instruction list (ATA creation, `beginSwap`, Titan swap instructions,
2358
- * `endSwap`, in order) and `lookupTables` needed to fit it in a versioned transaction.
2388
+ * Throws unless a quote swaps exactly the pair the `beginSwap`/`endSwap` pair is being built
2389
+ * for. A mismatched quote routes and executes normally, but deposits its output into a token
2390
+ * account `endSwap` isn't watching, so it reverts with `InvalidSwap: amount_out must be
2391
+ * greater than 0` only after the funds have already moved.
2359
2392
  */
2360
- getTitanSwapIx({ titanClient, outMarketIndex, inMarketIndex, outAssociatedTokenAccount, inAssociatedTokenAccount, amount, slippageBps, swapMode, onlyDirectRoutes, reduceOnly, userAccountPublicKey, }: {
2361
- titanClient: TitanClient;
2362
- outMarketIndex: number;
2363
- inMarketIndex: number;
2364
- outAssociatedTokenAccount?: PublicKey;
2365
- inAssociatedTokenAccount?: PublicKey;
2366
- amount: BN;
2367
- slippageBps?: number;
2368
- swapMode?: string;
2369
- onlyDirectRoutes?: boolean;
2370
- reduceOnly?: SwapReduceOnly;
2371
- userAccountPublicKey?: PublicKey;
2372
- }): Promise<{
2373
- ixs: TransactionInstruction[];
2374
- lookupTables: AddressLookupTableAccount[];
2375
- }>;
2393
+ protected assertQuoteMatchesMarkets(quote: {
2394
+ inputMint: string;
2395
+ outputMint: string;
2396
+ }, inMarket: SpotMarketAccount, outMarket: SpotMarketAccount): void;
2397
+ /**
2398
+ * Throws unless a quote is for the size the caller asked to swap. `beginSwap` releases funds
2399
+ * sized off the quote, so a quote for a different size moves the wrong amount out of the user's
2400
+ * deposits.
2401
+ */
2402
+ private assertQuoteMatchesAmount;
2376
2403
  /**
2377
- * Builds the instruction list for a Jupiter v6-routed swap: fetches a quote if none is passed,
2378
- * creates any missing associated token accounts, and wraps Jupiter's routing instructions
2379
- * between `beginSwap`/`endSwap`. See `swap` for parameter semantics; `amount` is in the "in"
2380
- * token's mint decimals.
2404
+ * Resolves the wallet's associated token account for a spot market, plus the instruction that
2405
+ * creates it when it doesn't exist yet.
2406
+ */
2407
+ private getOrCreateSwapTokenAccount;
2408
+ /**
2409
+ * Builds the instruction list for a swap routed through any `SwapProvider` (Jupiter, Titan, or
2410
+ * a `UnifiedSwapClient` wrapping either): creates any missing associated token accounts and
2411
+ * wraps the provider's routing instructions between `beginSwap`/`endSwap`.
2412
+ * @param swapProvider - Provider that quotes the swap and builds its route instructions.
2413
+ * @param outMarketIndex - Spot market index of the token being bought.
2414
+ * @param inMarketIndex - Spot market index of the token being sold.
2415
+ * @param outAssociatedTokenAccount - Token account to receive the bought token; created
2416
+ * idempotently if omitted.
2417
+ * @param inAssociatedTokenAccount - Token account to source the sold token from; created
2418
+ * idempotently if omitted.
2419
+ * @param amount - Amount in the "in" token's mint decimals, or the "out" token's when the
2420
+ * effective mode is `ExactOut`.
2421
+ * @param slippageBps - Max slippage in basis points; only used when a quote has to be fetched.
2422
+ * @param swapMode - `ExactIn` (default) or `ExactOut`. The mode a quote is fetched at; the
2423
+ * resulting quote's own mode is what sizes the swap, so it is ignored when `quote` is passed.
2424
+ * @param onlyDirectRoutes - Restricts a fetched quote to single-hop routes.
2425
+ * @param maxAccounts - Account budget for a fetched route.
2426
+ * @param reduceOnly - Which side must not increase in magnitude; enforced by `endSwap`.
2427
+ * @param quote - Pre-fetched quote. Authoritative when passed: its `swapMode` is the effective
2428
+ * mode, and it must be for this pair and this `amount`.
2381
2429
  * @param userAccountPublicKey - Optional user account override (e.g. when the account is being
2382
- * created in the same transaction).
2383
- * @throws If no quote is passed and Jupiter's quote API returns none.
2384
- * @returns `ixs` instruction list (ATA creation, `beginSwap`, Jupiter swap instructions,
2385
- * `endSwap`, in order) and `lookupTables` needed to fit it in a versioned transaction.
2430
+ * created in the same transaction and not yet resolvable via `getUserAccountPublicKey`).
2431
+ * @throws If the quote passed in or freshly fetched is for a different pair or a different
2432
+ * size than the swap being built.
2433
+ * @returns `ixs` ATA creation, `beginSwap`, the route's instructions, `endSwap`, in order
2434
+ * and the `lookupTables` needed to fit them in a versioned transaction.
2386
2435
  */
2387
- getJupiterSwapIxV6({ jupiterClient, outMarketIndex, inMarketIndex, outAssociatedTokenAccount, inAssociatedTokenAccount, amount, slippageBps, swapMode, onlyDirectRoutes, quote, reduceOnly, userAccountPublicKey, }: {
2388
- jupiterClient: JupiterClient;
2436
+ getProviderSwapIx({ swapProvider, outMarketIndex, inMarketIndex, outAssociatedTokenAccount, inAssociatedTokenAccount, amount, slippageBps, swapMode, onlyDirectRoutes, maxAccounts, reduceOnly, quote, userAccountPublicKey, }: {
2437
+ swapProvider: SwapProvider;
2389
2438
  outMarketIndex: number;
2390
2439
  inMarketIndex: number;
2391
2440
  outAssociatedTokenAccount?: PublicKey;
@@ -2394,8 +2443,9 @@ export declare class VelocityClient {
2394
2443
  slippageBps?: number;
2395
2444
  swapMode?: SwapMode;
2396
2445
  onlyDirectRoutes?: boolean;
2397
- quote?: QuoteResponse;
2446
+ maxAccounts?: number;
2398
2447
  reduceOnly?: SwapReduceOnly;
2448
+ quote?: SwapQuote;
2399
2449
  userAccountPublicKey?: PublicKey;
2400
2450
  }): Promise<{
2401
2451
  ixs: TransactionInstruction[];
@@ -2435,37 +2485,6 @@ export declare class VelocityClient {
2435
2485
  beginSwapIx: TransactionInstruction;
2436
2486
  endSwapIx: TransactionInstruction;
2437
2487
  }>;
2438
- /**
2439
- * Builds the instruction list for a swap routed through a `UnifiedSwapClient` (the current
2440
- * preferred swap path). Creates any missing associated token accounts and wraps the client's
2441
- * routing instructions between `beginSwap`/`endSwap`. See `swap` for parameter semantics;
2442
- * `amount` is in the "in" token's mint decimals (or "out" token's decimals when `swapMode` is
2443
- * `ExactOut`).
2444
- * @param userAccountPublicKey - Optional user account override (e.g. when the account is being
2445
- * created in the same transaction).
2446
- * @returns `ixs` — instruction list (ATA creation, `beginSwap`, routed swap instructions,
2447
- * `endSwap`, in order) and `lookupTables` needed to fit it in a versioned transaction.
2448
- */
2449
- getSwapIxV2({ swapClient, outMarketIndex, inMarketIndex, outAssociatedTokenAccount, inAssociatedTokenAccount, amount, slippageBps, swapMode, onlyDirectRoutes, reduceOnly, quote, v6, userAccountPublicKey, }: {
2450
- swapClient: UnifiedSwapClient;
2451
- outMarketIndex: number;
2452
- inMarketIndex: number;
2453
- outAssociatedTokenAccount?: PublicKey;
2454
- inAssociatedTokenAccount?: PublicKey;
2455
- amount: BN;
2456
- slippageBps?: number;
2457
- swapMode?: SwapMode;
2458
- onlyDirectRoutes?: boolean;
2459
- reduceOnly?: SwapReduceOnly;
2460
- quote?: UnifiedQuoteResponse;
2461
- v6?: {
2462
- quote?: QuoteResponse;
2463
- };
2464
- userAccountPublicKey?: PublicKey;
2465
- }): Promise<{
2466
- ixs: TransactionInstruction[];
2467
- lookupTables: AddressLookupTableAccount[];
2468
- }>;
2469
2488
  /**
2470
2489
  * Converts a portion of the user's deposited wSOL (spot market index 1) into mSOL (spot market
2471
2490
  * index 2) by staking it with Marinade Finance, then swapping the resulting mSOL back into the
@@ -2534,11 +2553,12 @@ export declare class VelocityClient {
2534
2553
  getForceCancelOrdersIx(userAccountPublicKey: PublicKey, userAccount: UserAccount, fillerPublicKey?: PublicKey): Promise<TransactionInstruction>;
2535
2554
  /**
2536
2555
  * Keeper instruction: trips the authority-wide equity floor breaker. Proves on-chain that the
2537
- * given subaccount's cross-margin total collateral is below its `equityFloor` (reverts with
2538
- * `SufficientCollateral` otherwise, or if no floor is set) and sets `equityBreakerTripped` on the
2539
- * authority's `UserStats` every subaccount of the authority then rejects risk-increasing fills,
2540
- * withdrawals and transfers out until the warm admin calls `resetEquityFloorBreaker`.
2541
- * Permissionless any signer may trip it; the margin calculation is the proof.
2556
+ * given subaccount's net equity (unweighted assets and perp PnL minus spot liabilities) is below
2557
+ * its `equityFloor` (reverts with `SufficientCollateral` otherwise, if no floor is set, or with
2558
+ * `InvalidOracle` if any of the subaccount's oracles is invalid) and sets `equityBreakerTripped`
2559
+ * on the authority's `UserStats` every subaccount of the authority then rejects risk-increasing
2560
+ * fills, withdrawals and transfers out until the warm admin calls `resetEquityFloorBreaker`.
2561
+ * Permissionless — any signer may trip it; the equity calculation is the proof.
2542
2562
  * @param userAccountPublicKey - Public key of the breached subaccount's user account.
2543
2563
  * @param user - Decoded user account of the breached subaccount.
2544
2564
  * @param txParams - Optional compute-unit/priority-fee overrides.
@@ -3326,7 +3346,8 @@ export declare class VelocityClient {
3326
3346
  * @param userAccountPublicKey - Public key of the user account being liquidated.
3327
3347
  * @param liquidatorSubAccountId - Liquidator's sub-account to credit; defaults to the active sub-account.
3328
3348
  * @param maxAccounts - Caps the number of accounts Jupiter's route may use.
3329
- * @throws If no quote can be fetched and `quote` was not supplied.
3349
+ * @throws If no quote can be fetched and `quote` was not supplied, or if the quote — passed in or
3350
+ * freshly fetched — is for a different pair or a different size than the swap being built.
3330
3351
  * @returns The ordered instructions (pre-instructions, `beginSwap`, Jupiter swap, `endSwap`) and
3331
3352
  * any address lookup tables the Jupiter route requires.
3332
3353
  */
@@ -3340,7 +3361,7 @@ export declare class VelocityClient {
3340
3361
  slippageBps?: number;
3341
3362
  swapMode?: SwapMode;
3342
3363
  onlyDirectRoutes?: boolean;
3343
- quote?: QuoteResponse;
3364
+ quote?: JupiterSwapQuote;
3344
3365
  userAccount: UserAccount;
3345
3366
  userAccountPublicKey: PublicKey;
3346
3367
  liquidatorSubAccountId?: number;