@pear-protocol/types 2.25.0 → 2.27.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.
@@ -778,6 +778,7 @@ export declare const CopySkipReason: z.ZodEnum<{
778
778
  FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
779
779
  PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
780
780
  LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
781
+ MARGIN_NOT_APPLIED: "MARGIN_NOT_APPLIED";
781
782
  FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
782
783
  FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
783
784
  TRUE_UP_STALE: "TRUE_UP_STALE";
@@ -792,6 +793,7 @@ export declare const CopyLeaderAction: z.ZodEnum<{
792
793
  REVERSE: "REVERSE";
793
794
  TWAP_END: "TWAP_END";
794
795
  LEVERAGE_CHANGED: "LEVERAGE_CHANGED";
796
+ MARGIN_ADJUSTED: "MARGIN_ADJUSTED";
795
797
  }>;
796
798
  export type CopyLeaderAction = z.infer<typeof CopyLeaderAction>;
797
799
  /** Leader execution provenance; these resources are never installed on the follower. */
@@ -877,6 +879,7 @@ export declare const CopyActivity: z.ZodObject<{
877
879
  REVERSE: "REVERSE";
878
880
  TWAP_END: "TWAP_END";
879
881
  LEVERAGE_CHANGED: "LEVERAGE_CHANGED";
882
+ MARGIN_ADJUSTED: "MARGIN_ADJUSTED";
880
883
  }>;
881
884
  executionSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
882
885
  origin: z.ZodLiteral<"DIRECT">;
@@ -923,6 +926,7 @@ export declare const CopyActivity: z.ZodObject<{
923
926
  FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
924
927
  PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
925
928
  LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
929
+ MARGIN_NOT_APPLIED: "MARGIN_NOT_APPLIED";
926
930
  FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
927
931
  FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
928
932
  TRUE_UP_STALE: "TRUE_UP_STALE";
@@ -520,6 +520,7 @@ export declare const CopyJoinResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
520
520
  FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
521
521
  PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
522
522
  LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
523
+ MARGIN_NOT_APPLIED: "MARGIN_NOT_APPLIED";
523
524
  FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
524
525
  FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
525
526
  TRUE_UP_STALE: "TRUE_UP_STALE";
@@ -706,6 +707,7 @@ export declare const CreateCopySubscriptionResponse: z.ZodObject<{
706
707
  FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
707
708
  PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
708
709
  LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
710
+ MARGIN_NOT_APPLIED: "MARGIN_NOT_APPLIED";
709
711
  FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
710
712
  FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
711
713
  TRUE_UP_STALE: "TRUE_UP_STALE";
@@ -1018,6 +1020,7 @@ export declare const CopyActivityListResponse: z.ZodObject<{
1018
1020
  REVERSE: "REVERSE";
1019
1021
  TWAP_END: "TWAP_END";
1020
1022
  LEVERAGE_CHANGED: "LEVERAGE_CHANGED";
1023
+ MARGIN_ADJUSTED: "MARGIN_ADJUSTED";
1021
1024
  }>;
1022
1025
  executionSource: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1023
1026
  origin: z.ZodLiteral<"DIRECT">;
@@ -1064,6 +1067,7 @@ export declare const CopyActivityListResponse: z.ZodObject<{
1064
1067
  FOLLOWER_EQUITY_UNREADABLE: "FOLLOWER_EQUITY_UNREADABLE";
1065
1068
  PRICE_UNAVAILABLE: "PRICE_UNAVAILABLE";
1066
1069
  LEVERAGE_NOT_APPLIED: "LEVERAGE_NOT_APPLIED";
1070
+ MARGIN_NOT_APPLIED: "MARGIN_NOT_APPLIED";
1067
1071
  FOLLOWER_TWAP_NOT_ACTIVE: "FOLLOWER_TWAP_NOT_ACTIVE";
1068
1072
  FOLLOWER_TWAP_ALREADY_ACTIVE: "FOLLOWER_TWAP_ALREADY_ACTIVE";
1069
1073
  TRUE_UP_STALE: "TRUE_UP_STALE";
@@ -95,39 +95,3 @@ export declare const PositionFillListResponse: z.ZodObject<{
95
95
  }, z.core.$strip>>;
96
96
  }, z.core.$strip>;
97
97
  export type PositionFillListResponse = z.output<typeof PositionFillListResponse>;
98
- export declare const ProvisionalFill: z.ZodObject<{
99
- id: z.ZodUUID;
100
- tradeAccountId: z.ZodUUID;
101
- connector: z.ZodEnum<{
102
- hyperliquid: "hyperliquid";
103
- binance: "binance";
104
- bybit: "bybit";
105
- okx: "okx";
106
- lighter: "lighter";
107
- lighter_rhc: "lighter_rhc";
108
- }>;
109
- executionId: z.ZodOptional<z.ZodUUID>;
110
- symbol: z.ZodString;
111
- cloid: z.ZodOptional<z.ZodString>;
112
- status: z.ZodLiteral<"PROVISIONAL">;
113
- }, z.core.$strip>;
114
- export declare const ProvisionalFillListResponse: z.ZodObject<{
115
- fills: z.ZodArray<z.ZodObject<{
116
- id: z.ZodUUID;
117
- tradeAccountId: z.ZodUUID;
118
- connector: z.ZodEnum<{
119
- hyperliquid: "hyperliquid";
120
- binance: "binance";
121
- bybit: "bybit";
122
- okx: "okx";
123
- lighter: "lighter";
124
- lighter_rhc: "lighter_rhc";
125
- }>;
126
- executionId: z.ZodOptional<z.ZodUUID>;
127
- symbol: z.ZodString;
128
- cloid: z.ZodOptional<z.ZodString>;
129
- status: z.ZodLiteral<"PROVISIONAL">;
130
- }, z.core.$strip>>;
131
- }, z.core.$strip>;
132
- export type ProvisionalFill = z.output<typeof ProvisionalFill>;
133
- export type ProvisionalFillListResponse = z.output<typeof ProvisionalFillListResponse>;
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ var __export = (target, all) => {
10
10
  // src/bundle.ts
11
11
  var bundle_exports = {};
12
12
  __export(bundle_exports, {
13
+ AccountModeResponse: () => AccountModeResponse,
13
14
  Activity: () => Activity,
14
15
  ActivityItemResponse: () => ActivityItemResponse,
15
16
  ActivityResponse: () => ActivityResponse,
@@ -108,7 +109,6 @@ __export(bundle_exports, {
108
109
  CreateApiKeyInput: () => CreateApiKeyInput,
109
110
  CreateApiKeyOutput: () => CreateApiKeyOutput,
110
111
  CreateApiKeyWithMessageResult: () => CreateApiKeyWithMessageResult,
111
- CreateApplicablesBulkFields: () => CreateApplicablesBulkFields,
112
112
  CreateApplicablesMeta: () => CreateApplicablesMeta,
113
113
  CreateApplicablesRequest: () => CreateApplicablesRequest,
114
114
  CreateAuthTokenParams: () => CreateAuthTokenParams,
@@ -331,8 +331,6 @@ __export(bundle_exports, {
331
331
  OpenPositionLeg: () => OpenPositionLeg,
332
332
  OpenPositionListParams: () => OpenPositionListParams,
333
333
  OpenPositionListResponse: () => OpenPositionListResponse,
334
- OpenPositionLite: () => OpenPositionLite,
335
- OpenPositionLiteListResponse: () => OpenPositionLiteListResponse,
336
334
  OracleTrigger: () => OracleTrigger,
337
335
  OracleUnit: () => OracleUnit,
338
336
  OracleValue: () => OracleValue,
@@ -379,8 +377,6 @@ __export(bundle_exports, {
379
377
  PricesQueryParams: () => PricesQueryParams,
380
378
  PricesResponse: () => PricesResponse,
381
379
  ProfileResponse: () => ProfileResponse,
382
- ProvisionalFill: () => ProvisionalFill,
383
- ProvisionalFillListResponse: () => ProvisionalFillListResponse,
384
380
  PublicClosedPosition: () => PublicClosedPosition,
385
381
  PublicLadder: () => PublicLadder,
386
382
  PublicOpenPosition: () => PublicOpenPosition,
@@ -453,6 +449,7 @@ __export(bundle_exports, {
453
449
  ScheduleStrategy: () => ScheduleStrategy,
454
450
  SearchTriggersParams: () => SearchTriggersParams,
455
451
  SearchTriggersResponse: () => SearchTriggersResponse,
452
+ SetAccountMode: () => SetAccountMode,
456
453
  SetLeverage: () => SetLeverage,
457
454
  SetLeverageResponse: () => SetLeverageResponse,
458
455
  SetLighterSubAccountMetadataParams: () => SetLighterSubAccountMetadataParams,
@@ -479,12 +476,9 @@ __export(bundle_exports, {
479
476
  SubmitChangePubKeyResult: () => SubmitChangePubKeyResult,
480
477
  SubmitLighterFastWithdrawParams: () => SubmitLighterFastWithdrawParams,
481
478
  SubmitLighterFastWithdrawResult: () => SubmitLighterFastWithdrawResult,
482
- SyncFillsResponse: () => SyncFillsResponse,
483
- SyncFillsSinceRequest: () => SyncFillsSinceRequest,
484
- SyncFillsSinceResponse: () => SyncFillsSinceResponse,
485
- SyncFundingSinceRequest: () => SyncFundingSinceRequest,
486
- SyncFundingSinceResponse: () => SyncFundingSinceResponse,
479
+ SyncCredentialsRejectionReason: () => SyncCredentialsRejectionReason,
487
480
  SyncMeta: () => SyncMeta,
481
+ SyncRefreshResponse: () => SyncRefreshResponse,
488
482
  TWAPClose: () => TWAPClose,
489
483
  TWAPOpen: () => TWAPOpen,
490
484
  TWAPRandomization: () => TWAPRandomization,
@@ -564,6 +558,7 @@ __export(bundle_exports, {
564
558
  UserPreferences: () => UserPreferences,
565
559
  UserProfile: () => UserProfile,
566
560
  Vault: () => Vault,
561
+ VaultAccountMode: () => VaultAccountMode,
567
562
  VaultClosedPosition: () => VaultClosedPosition,
568
563
  VaultClosedPositionLeg: () => VaultClosedPositionLeg,
569
564
  VaultClosedPositionListParams: () => VaultClosedPositionListParams,
@@ -916,7 +911,16 @@ var InstrumentPrecision = z.object({
916
911
  /**
917
912
  * The maximum notional amount in USD.
918
913
  */
919
- max: z.number().transform((val) => val === null ? void 0 : val).optional().nullable()
914
+ max: z.number().transform((val) => val === null ? void 0 : val).optional().nullable(),
915
+ /**
916
+ * Headroom in USD a client adds above `min` when it sizes a leg: it asks for at least
917
+ * `min + minBuffer` (a SELL `min / (1 − slippage) + minBuffer`). The server re-prices the leg,
918
+ * rounds its quantity onto the venue's step and checks it strictly against the venue's floor, so
919
+ * the buffer covers that rounding and a price move of up to 10% either way. It is priced per
920
+ * instrument from the current price, so it moves with the market and refreshes with the list.
921
+ * Present only beside a `min`.
922
+ */
923
+ minBuffer: z.number().optional()
920
924
  }).optional()
921
925
  });
922
926
 
@@ -1754,6 +1758,7 @@ var CopySkipReason = z.enum([
1754
1758
  "FOLLOWER_EQUITY_UNREADABLE",
1755
1759
  "PRICE_UNAVAILABLE",
1756
1760
  "LEVERAGE_NOT_APPLIED",
1761
+ "MARGIN_NOT_APPLIED",
1757
1762
  "FOLLOWER_TWAP_NOT_ACTIVE",
1758
1763
  "FOLLOWER_TWAP_ALREADY_ACTIVE",
1759
1764
  "TRUE_UP_STALE",
@@ -1766,7 +1771,8 @@ var CopyLeaderAction = z.enum([
1766
1771
  "REVERSE",
1767
1772
  "TWAP",
1768
1773
  "TWAP_END",
1769
- "LEVERAGE_CHANGED"
1774
+ "LEVERAGE_CHANGED",
1775
+ "MARGIN_ADJUSTED"
1770
1776
  ]);
1771
1777
  var CopyExecutionSource = z.discriminatedUnion("origin", [
1772
1778
  z.object({
@@ -2665,20 +2671,6 @@ var VaultClosedPositionListParams = CursorFindParams.extend({
2665
2671
  var PositionListResponse = CursorResponse.extend({
2666
2672
  positions: z.array(Position)
2667
2673
  });
2668
- var OpenPositionLite = z.object({
2669
- id: z.uuid(),
2670
- /** The subscription that opened the position is identified only in this authenticated read. */
2671
- copySubscriptionId: z.uuid().optional(),
2672
- positionKey: z.string().trim().min(1, "positionKey must be non-empty"),
2673
- createdAt: z.iso.datetime(),
2674
- exposure: z.record(InstrumentId, SignedDecimalString),
2675
- status: z.literal("OPEN"),
2676
- origin: PositionOrigin,
2677
- connector: Connector
2678
- });
2679
- var OpenPositionLiteListResponse = z.object({
2680
- positions: z.array(OpenPositionLite)
2681
- });
2682
2674
  var ClosedPositionListResponse = CursorResponse.extend({
2683
2675
  positions: z.array(ClosedPosition)
2684
2676
  });
@@ -3027,18 +3019,6 @@ var FillListResponse = CursorResponse.extend({
3027
3019
  var PositionFillListResponse = z.object({
3028
3020
  fills: z.array(PositionFill)
3029
3021
  });
3030
- var ProvisionalFill = z.object({
3031
- id: z.uuid(),
3032
- tradeAccountId: z.uuid(),
3033
- connector: Connector,
3034
- executionId: z.uuid().optional(),
3035
- symbol: InstrumentId,
3036
- cloid: z.string().optional(),
3037
- status: z.literal("PROVISIONAL")
3038
- });
3039
- var ProvisionalFillListResponse = z.object({
3040
- fills: z.array(ProvisionalFill)
3041
- });
3042
3022
  var FundingInfo = z.object({
3043
3023
  /**
3044
3024
  * Funding rate
@@ -4536,6 +4516,7 @@ var NotificationCategory = z.enum([
4536
4516
  "COPY_FAILED",
4537
4517
  "COPY_SUBSCRIPTION_STOPPED",
4538
4518
  "COPY_LEVERAGE_NOT_APPLIED",
4519
+ "COPY_MARGIN_NOT_APPLIED",
4539
4520
  "POSITION_LIQUIDATION",
4540
4521
  "TRIGGER_CANCELLED_POSITION_RESIZED",
4541
4522
  "TAKE_PROFIT_PARTIAL",
@@ -4774,6 +4755,11 @@ var CopyLeverageNotAppliedNotificationParameters = z.object({
4774
4755
  subscriptionId: z.uuid(),
4775
4756
  activityId: z.uuid()
4776
4757
  });
4758
+ var CopyMarginNotAppliedNotificationParameters = z.object({
4759
+ type: z.literal("copy_margin_not_applied"),
4760
+ subscriptionId: z.uuid(),
4761
+ activityId: z.uuid()
4762
+ });
4777
4763
  var PositionLiquidationNotificationParameters = z.object({
4778
4764
  type: z.literal("position_liquidation"),
4779
4765
  positionId: z.uuid(),
@@ -4808,6 +4794,7 @@ var NotificationParameters = z.discriminatedUnion("type", [
4808
4794
  CopyFailedNotificationParameters,
4809
4795
  CopySubscriptionStoppedNotificationParameters,
4810
4796
  CopyLeverageNotAppliedNotificationParameters,
4797
+ CopyMarginNotAppliedNotificationParameters,
4811
4798
  TriggerCancelledPositionResizedNotificationParameters,
4812
4799
  TriggerCancelledByOperatorNotificationParameters,
4813
4800
  LadderCancelledByOperatorNotificationParameters,
@@ -5139,10 +5126,12 @@ var UserEventTopic = z.enum([
5139
5126
  "rebalance.executed",
5140
5127
  "rebalance.paused",
5141
5128
  "rebalance.cancelled",
5142
- "notification.created"
5129
+ "notification.created",
5130
+ "import.started",
5131
+ "import.completed"
5143
5132
  ]);
5144
5133
  var UserEventData = z.object({
5145
- // The changed entity (execution, position, schedule, ladder, trigger, rebalance or notification id).
5134
+ // The changed entity (execution, position, schedule, ladder, trigger, rebalance, notification or trade account id).
5146
5135
  entityId: z.string()
5147
5136
  });
5148
5137
  var PublicVaultDataset = z.enum([
@@ -6071,12 +6060,6 @@ var UnknownExternalFill = z.object({
6071
6060
  builderFee: UnsignedDecimalString,
6072
6061
  liquidation: LiquidationMark
6073
6062
  });
6074
- var SyncFillsSinceRequest = z.object({
6075
- overlapMs: z.number().int().positive()
6076
- });
6077
- var SyncFundingSinceRequest = z.object({
6078
- overlapMs: z.number().int().positive()
6079
- });
6080
6063
  var ExternalPosition = z.object({
6081
6064
  symbol: InstrumentId,
6082
6065
  size: UnsignedDecimalString.describe("BASE units, contractSize applied; always >= 0"),
@@ -6132,11 +6115,8 @@ var SyncMeta = z.object({
6132
6115
  var CreateApplicablesMeta = SyncMeta.extend({
6133
6116
  firstSyncStartedAt: z.number().int().nonnegative().optional().describe("backend-issued timestamp returned before the first fill-history fetch"),
6134
6117
  newestFillTs: z.number().int().nonnegative().refine((timestamp) => timestamp <= Date.now() + WATERMARK_FUTURE_SKEW_MS, "newestFillTs must not be ahead of server time").optional().describe("raw newest fetched fill \u2014 settle-gate source, never trim-advanced; present exactly when externalMaxTs is"),
6135
- executionsUpdatedAtEpochMs: z.number().int().nonnegative().describe("verbatim echo of fills/since executionsUpdatedAtEpochMs \u2014 stale-read gate token, not a client clock")
6118
+ executionsUpdatedAtEpochMs: z.number().int().nonnegative().describe("minted by the syncer from its own executions read \u2014 the admission stale-read gate compares it against later execution writes")
6136
6119
  }).superRefine(refineNewestFillTsPairsWithWatermark);
6137
- var CreateApplicablesBulkFields = z.object({
6138
- executionsUpdatedAtEpochMs: z.string().regex(/^\d+$/, "Must be a non-negative integer millisecond value").transform(Number).describe("mirror of meta.executionsUpdatedAtEpochMs, readable without decompressing the payload")
6139
- });
6140
6120
  var CreateApplicablesRequest = z.object({
6141
6121
  fills: z.array(ApplicableFill),
6142
6122
  applicables: z.array(ApplicablePosition),
@@ -6177,29 +6157,17 @@ function refineNewestFillTsPairsWithWatermark(meta, ctx) {
6177
6157
  }
6178
6158
  }
6179
6159
  __name(refineNewestFillTsPairsWithWatermark, "refineNewestFillTsPairsWithWatermark");
6180
- var SyncFillsResponse = z.object({});
6181
- var SyncFillsSinceResponse = z.object({
6182
- sinceMs: z.number().int().nonnegative(),
6183
- // True only when the account has no checkpoint and nothing to anchor on, so sync starts from
6184
- // genesis. Clients use this to detect an account that has never imported its trade history —
6185
- // `sinceMs === 0` alone is ambiguous (a clamped watermark also yields 0).
6160
+ var SyncCredentialsRejectionReason = z.enum([
6161
+ "venue-account-missing",
6162
+ "credentials-invalid"
6163
+ ]);
6164
+ var SyncRefreshResponse = z.object({
6186
6165
  neverSynced: z.boolean(),
6187
- // Backend-clock boundary returned only for a never-synced account. The syncer carries this
6188
- // through when an empty exchange fetch provides no fill-derived checkpoint.
6189
- firstSyncStartedAt: z.number().int().nonnegative().optional(),
6190
- confirmedExchangeFillIds: z.array(z.string()).optional(),
6191
- // A pending correction needs the next full snapshot even when there are no fills to apply.
6192
- hasPendingSynthetics: z.boolean().optional(),
6193
- // Newest executions.updatedAt this response can have observed, as epoch ms ceiled to the next
6194
- // whole millisecond (the column keeps microseconds); 0 when the account has no executions. The
6195
- // client echoes it verbatim in the create meta — core defers the create when any execution
6196
- // write postdates it. No client clock on the wire: ordering is against our own persisted
6197
- // updated_at values (Postgres now() on insert, the engine's clock on updates — the settle
6198
- // gate covers skew between those writers).
6199
- executionsUpdatedAtEpochMs: z.number().int().nonnegative()
6200
- });
6201
- var SyncFundingSinceResponse = z.object({
6202
- sinceMs: z.number().int().nonnegative()
6166
+ // Present while the sync holds the account because the venue refused its stored credentials; absent otherwise.
6167
+ // A held account is read again only on a sync request or a credentials update. The 202 answers before the
6168
+ // requested attempt runs, so this is the last known state: the first request after a fix on the venue still
6169
+ // reports the refusal, and the next one shows the attempt's result.
6170
+ credentialsRejection: SyncCredentialsRejectionReason.optional()
6203
6171
  });
6204
6172
  var TcaMetricStatus = z.literal("FINAL");
6205
6173
  var TcaTimingGranularity = z.enum([
@@ -7304,6 +7272,13 @@ var WithdrawToEvm = LeaderSignedAction.extend({
7304
7272
  }).strict();
7305
7273
  var AgentApprove = LeaderSignedAction.strict();
7306
7274
  var SetUnifiedAccount = LeaderSignedAction.strict();
7275
+ var VaultAccountMode = z.enum([
7276
+ "unifiedAccount",
7277
+ "portfolioMargin"
7278
+ ]);
7279
+ var SetAccountMode = LeaderSignedAction.extend({
7280
+ mode: VaultAccountMode
7281
+ }).strict();
7307
7282
  var BuilderFeeApproval = z.object({
7308
7283
  builderAddress: EthereumAddress2,
7309
7284
  // Typed as the percent literal Hyperliquid's SDK demands; the predicate is the same rule the regex enforced.
@@ -7511,6 +7486,10 @@ var UnifiedAccountResponse = z.object({
7511
7486
  success: z.boolean(),
7512
7487
  agentAddress: z.string()
7513
7488
  });
7489
+ var AccountModeResponse = z.object({
7490
+ agentAddress: z.string(),
7491
+ mode: VaultAccountMode
7492
+ });
7514
7493
  var NavRangeResponse = z.object({
7515
7494
  points: z.array(NavBucketPoint)
7516
7495
  });
@@ -7573,6 +7552,9 @@ var VaultServiceError = z.discriminatedUnion("error", [
7573
7552
  error: z.literal("UNAUTHORIZED"),
7574
7553
  reason: z.string()
7575
7554
  }),
7555
+ z.object({
7556
+ error: z.literal("CREATOR_NOT_APPROVED")
7557
+ }),
7576
7558
  z.object({
7577
7559
  error: z.literal("NOT_OWNER"),
7578
7560
  vaultAddress: z.string()
@@ -7614,6 +7596,24 @@ var VaultServiceError = z.discriminatedUnion("error", [
7614
7596
  error: z.literal("HL_SET_ABSTRACTION_FAILED"),
7615
7597
  incidentId: z.string()
7616
7598
  }),
7599
+ // Account mode refusals: the venue's own reason, a mode it did not apply, or a book that must be flat first.
7600
+ z.object({
7601
+ error: z.literal("HL_ACCOUNT_MODE_REFUSED"),
7602
+ vaultAddress: z.string(),
7603
+ mode: VaultAccountMode,
7604
+ reason: z.string()
7605
+ }),
7606
+ z.object({
7607
+ error: z.literal("HL_ACCOUNT_MODE_NOT_APPLIED"),
7608
+ vaultAddress: z.string(),
7609
+ requested: VaultAccountMode,
7610
+ applied: z.string()
7611
+ }),
7612
+ z.object({
7613
+ error: z.literal("AGENT_HAS_OPEN_POSITIONS"),
7614
+ vaultAddress: z.string(),
7615
+ openPositions: z.number().int()
7616
+ }),
7617
7617
  // On-chain reads and workflow-answered refusals.
7618
7618
  z.object({
7619
7619
  error: z.literal("EVM_OPERATION_FAILED"),
@@ -7692,4 +7692,4 @@ var VaultServiceError = z.discriminatedUnion("error", [
7692
7692
  })
7693
7693
  ]);
7694
7694
 
7695
- export { Activity, ActivityItemResponse, ActivityResponse, AdjustIsolatedMargin, AdjustIsolatedMarginResponse, AgentApprove, AgentApproveResponse, AgentApproveResult, ApiKeyMeResponse, ApiKeyScope, ApiKeySummary, ApplicableFill, ApplicableFillAssignment, ApplicableMetadata, ApplicablePosition, AppliedFeeDiscount, AttachTriggerMarketClose, AttachTriggerMarketCloseList, AttachTriggerMarketCloseStatic, AttachTriggerMarketCloseTrailing, AuthenticatedUser, AutoRebalanceBetaState, AutoRebalanceConfig, AutoRebalanceListParams, AutoRebalanceListResponse, AutoRebalancePausedReason, AutoRebalanceStatus, AutoRebalanceTimeframe, AutoRebalanceWeightSource, BaseExecution, BasketMarket, BindReferralCode, BoundReferralReferee, BracketType, BuilderFeeApproval, BulkSnapshotPoint, BulkSnapshotsResponse, CancelAllSchedulesResponse, CancelAllTriggersResponse, CancelLadderResponse, CancelScheduleResponse, CancelTriggerResponse, ChangeLighterAccountTierParams, ChangeLighterAccountTierResult, ChangePasswordRequest, ChangePasswordResponse, ClosedPosition, ClosedPositionLeg, ClosedPositionLegSide, ClosedPositionListParams, ClosedPositionListResponse, ConnectedIdentity, Connector, CopyAccountPerformance, CopyActivity, CopyActivityLeg, CopyActivityListParams, CopyActivityListResponse, CopyActivityOutcome, CopyActivityState, CopyActivityTWAP, CopyActivityTWAPReduction, CopyCaptureTiming, CopyControlTransferReason, CopyCoverage, CopyEndCapture, CopyEndCaptureStatus, CopyEndedSubscriptionWithVolume, CopyExecutionSource, CopyFollower, CopyFollowerStats, CopyFollowersResponse, CopyHealthResponse, CopyJoinResult, CopyLeaderAction, CopyManagedPosition, CopyPerformance, CopyPnlBreakdown, CopySizing, CopySkipReason, CopyStartSnapshot, CopyStartingAccount, CopyStateResponse, CopyStatsParams, CopyStatsResponse, CopySubscription, CopySubscriptionListQuery, CopySubscriptionListResponse, CopySubscriptionMetrics, CopySubscriptionRead, CopySubscriptionResponse, CopySubscriptionStatus, CopySubscriptionWithMetrics, CopyUnmanagedFollowerPositionReason, CopyUnmanagedPosition, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyWithMessageResult, CreateApplicablesBulkFields, CreateApplicablesMeta, CreateApplicablesRequest, CreateAuthTokenParams, CreateAuthTokenResult, CreateAutoRebalanceConfig, CreateAutoRebalanceResponse, CreateCopySubscription, CreateCopySubscriptionResponse, CreateFundingPaymentsRequest, CreateLadder, CreateLadderMarketOpen, CreateLadderResponse, CreateLighterApiKeyParams, CreateLighterSubAccountParams, CreateLighterSubAccountResult, CreateLighterUdaParams, CreateLighterUdaResult, CreateMarketAdjust, CreateMarketClose, CreateMarketCloseAll, CreateMarketOpen, CreateMarketReverse, CreateReferralCode, CreateRewardClaim, CreateSavedBasketPayload, CreateSavedBasketResponse, CreateSchedule, CreateScheduleResponse, CreateTWAPClose, CreateTWAPOpen, CreateTradeAccount, CreateTradeAdjust, CreateTradeAdjustResponse, CreateTradeClose, CreateTradeCloseAll, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpen, CreateTradeOpenResponse, CreateTradeReverse, CreateTradeReverseResponse, CreateTriggerClose, CreateTriggerConditionAttachStatic, CreateTriggerConditionAttachTrailing, CreateTriggerConditionCloseStatic, CreateTriggerConditionCloseTrailing, CreateTriggerConditionOpen, CreateTriggerMarketAdjust, CreateTriggerMarketClose, CreateTriggerMarketCloseStatic, CreateTriggerMarketCloseTrailing, CreateTriggerMarketOpen, CreateTriggerOpen, CreateTriggerResponse, CreateTriggerTWAPAdjust, CreateTriggerTWAPClose, CreateTriggerTWAPCloseStatic, CreateTriggerTWAPCloseTrailing, CreateVault, CreateVaultTradeAccount, CreatedVaultResponse, CreatedVaultResult, DEFAULT_TWAP_RANDOMIZATION, DisconnectXResponse, DiscountRate, EmailLoginRequest, EmailRegisterRequest, EndCopySubscriptionResponse, EthereumAddress2 as EthereumAddress, EthereumTransactionHash, ExchangeCredentialsResponse, ExchangeXLoginRequest, Execution, ExecutionErrorCode, ExecutionFulfillment, ExecutionIntent, ExecutionLegMode, ExecutionListParams, ExecutionListResponse, ExecutionOrderType, ExecutionRefusedLeg, ExecutionRefusedLegErrorCode, ExecutionStatus, ExternalPosition, ExternalTrigger, ExternalTriggerSource, FINAL_TWAP_SLICE_START_HEADROOM_SEC, FeeBps, FeeConnector, FeeDiscountScope, FeeOverrideScope, FeeRecipientResponse, FeeResponse, FeeRole, Fill, FillAssignment, FillListParams, FillListResponse, FillOrderBy, FillStatus, ForgotPasswordRequest, ForgotPasswordResponse, FundingInfo, FundingPaymentEntry, FundingQueryParams, FundingResponse, FundingUpdatedData, GetExecutionResponse, GetFeeRecipientParams, bundle_exports as HttpTypes, Instrument, InstrumentFundingMap, InstrumentId, InstrumentListLiteResponse, InstrumentListParams, InstrumentListResponse, InstrumentLite, InstrumentMarginMode, InstrumentPrecision, InstrumentPriceMap, InstrumentScope, InstrumentSymbolToIdMapResponse, InstrumentTradeability, InstrumentTradeabilityReason, InstrumentTradeabilityStatus, InstrumentType, LEADERBOARD_MAX_LIMIT, Ladder, LadderConditionOpen, LadderConfig, LadderListParams, LadderListResponse, LadderResponse, LadderStatus, LeaderSignedAction, LeaderboardArchiveListResponse, LeaderboardArchiveParams, LeaderboardArchivePeriodParams, LeaderboardArchiveResponse, LeaderboardQueryParams, LeaderboardResponse, LeaderboardRow, LeaderboardSnapshotParams, LeaderboardSnapshotQueryParams, LeaderboardSnapshotResponse, LeaderboardSortBy, LeaderboardStatus, LighterAccountTier, LighterUdaResolution, LighterUdaTransaction, LinkEmailRequest, LinkEmailResponse, LinkWalletRequest, LinkWalletResponse, ListApiKeysOutput, ListLighterUdaDepositsParams, ListLighterUdaDepositsResult, ListRewardClaimsQuery, LoginMethod, LoginRequest, LoginResponse, LogoutRequest, LogoutResponse, MARKET_BASKET_POSITION_COUNTS_MAX_BASKETS, MAX_FEE_BPS, MAX_TWAP_DURATION_SEC, MAX_VAULTS_PER_CONNECTION, MIN_TWAP_SLICE_INTERVAL_SEC, ManagementVaultDataset, ManagementVaultInvalidatedData, MarginMode, MarkNotificationUnreadPayload, MarkNotificationUnreadResponse, MarkNotificationsReadPayload, MarkNotificationsReadResponse, Market, MarketAdjustExecution, MarketBasketPositionCounts, MarketBasketPositionCountsPayload, MarketBasketPositionCountsResponse, MarketBasketsQueryParams, MarketBasketsResponse, MarketCloseExecution, MarketExecution, MarketOpenExecution, MarketOrder, MarketReverseExecution, MarketTotals, MarketsQueryParams, MarketsResponse, MeResponse, MetricTrack, NavBucket, NavBucketPoint, NavRangeQueryParams, NavRangeResponse, NavResolution, NavSnapshot, NavSnapshotResponse, NavStatsQueryParams, NavStatsResponse, NavStatsWindow, Notification, NotificationCategory, NotificationListParams, NotificationListResponse, NotificationMetric, NotificationParameters, NullableNumber, ORDERED_VALIDITY_WINDOW_MESSAGE, OauthGrant, OauthGrantsResponse, OauthInteractionClient, OauthInteractionConfirmRequest, OauthInteractionDetailsResponse, OauthInteractionRedirectResponse, OiStatistics, OiStatisticsQueryParams, OiStatisticsResponse, OpenPosition, OpenPositionLeg, OpenPositionListParams, OpenPositionListResponse, OpenPositionLite, OpenPositionLiteListResponse, OracleTrigger, OracleUnit, OracleValue, Order, OrderStatus, PendingReferralReferee, PortfolioAnalyticsConfig, PortfolioAnalyticsInterval, PortfolioAnalyticsQuery, PortfolioAnalyticsResponse, PortfolioCashflowAmounts, PortfolioCashflowIntervals, PortfolioCashflowSeriesPoint, PortfolioClosedPositionStats, PortfolioOpenSnapshot, PortfolioPairBreakdown, PortfolioQuery, PortfolioResponse, PortfolioSource, PortfolioVolumeAmounts, PortfolioVolumeIntervals, PortfolioVolumeSeriesPoint, Position, PositionClosedReason, PositionEntryPrices, PositionExposure, PositionFill, PositionFillListResponse, PositionInitialExposureUSD, PositionListParams, PositionListResponse, PositionOrigin, PositionStatus, PositionStep, PositionStepLeg, PositionTotalFundingPayment, PositiveAmount, PrepareApproveIntegratorParams, PrepareApproveIntegratorResult, PrepareLighterFastWithdrawParams, PrepareLighterFastWithdrawResult, PriceSource, PriceUpdatedData, PricesQueryParams, PricesResponse, ProfileResponse, ProvisionalFill, ProvisionalFillListResponse, PublicClosedPosition, PublicLadder, PublicOpenPosition, PublicSchedule, PublicTradeLeg, PublicTraderClosedPositionsParams, PublicTraderClosedPositionsResponse, PublicTraderParams, PublicTraderQuery, PublicTraderResponse, PublicTrigger, PublicVaultDataset, PublicVaultInvalidatedData, QuoteFeeParams, RealtimeFunding, RealtimePrice, RebalanceEvent, RebalanceEventListParams, RebalanceEventListResponse, RebalanceEventStatus, RebalanceManual, RebalanceManualResponse, RecommendedBasket, RecommendedBasketLeg, RecommendedBasketListResponse, ReferralReferee, ReferralRefereeListParams, ReferralRefereeListResponse, ReferralStatusResponse, RefineStaticLogicalRules, RefineTrailingConfig, RefineTrailingLogicalRules, RefreshSessionResponse, RefreshTokenRequest, RefreshTokenResponse, RegisterEmailResponse, ReplaceAutoRebalanceConfig, RequestNonceRequest, RequestNonceResponse, ResendVerificationForRegisterRequest, ResendVerificationResponse, ResetPasswordRequest, ResetPasswordResponse, ResizeBehavior, RewardAccrual, RewardAccrualResponse, RewardClaimId, RewardClaimListResponse, RewardClaimResponse, RewardClaimStatus, RewardClaimStatusResponse, RewardPayoutAvailability, RewardSourceAccrual, RewardSummaryResponse, SavedBasket, SavedBasketLeg, SavedBasketListResponse, Schedule, ScheduleCancelledReason, ScheduleDetailParams, ScheduleDetailResponse, ScheduleExecutionType, ScheduleFailedReason, ScheduleFailure, ScheduleIntent, ScheduleListParams, ScheduleListResponse, ScheduleSlice, ScheduleStatus, ScheduleStrategy, SearchTriggersParams, SearchTriggersResponse, SetLeverage, SetLeverageResponse, SetLighterSubAccountMetadataParams, SetTrader, SetTraderResponse, SetTraderResult, SetUnifiedAccount, SetXVisibilityRequest, SetXVisibilityResponse, SnapshotsBulk, SparklinePoint, SparklineRange, StartXLinkRequest, StartXLinkResponse, StartXLoginRequest, StartXLoginResponse, StatisticsTotals, StatisticsTotalsQueryParams, StatisticsTotalsResponse, StpearFeePricing, SubmitApproveIntegratorParams, SubmitApproveIntegratorResult, SubmitChangePubKeyParams, SubmitChangePubKeyResult, SubmitLighterFastWithdrawParams, SubmitLighterFastWithdrawResult, SyncFillsResponse, SyncFillsSinceRequest, SyncFillsSinceResponse, SyncFundingSinceRequest, SyncFundingSinceResponse, SyncMeta, TWAPClose, TWAPOpen, TWAPRandomization, TcaBenchmarkResponse, TcaExecutionResponse, TcaExecutionSummaryContextResponse, TcaExecutionSummaryLegResponse, TcaExecutionSummaryResponse, TcaFillMetricResponse, TcaMetricStatus, TcaPositionQueryParams, TcaPositionResponse, TcaSummaryQueryParams, TcaSummaryResponse, TcaSummaryTotalsResponse, TcaTimingGranularity, TpSlBracketType, TradeAccount, TradeAccountListParams, TradeAccountListResponse, TradeAccountResponse, TradeExecutedData, TradeFill, TradeGroup, TradeLeg, TradeLegPostOnly, TradeLegPostOnlyWithMaxImpactPrice, TradeLegWithMaxImpactPrice, TradeListParams, TradeListResponse, TradePositionEffect, TradePositionState, TradeRealization, TraderPerformancePoint, TraderPerformanceQuery, TraderPerformanceResponse, Trailing, TrailingConfig, TrailingMode, TransferLighterSubAccountParams, TransferLighterSubAccountResult, Trigger, TriggerCancelledReason, TriggerConditionAdjust, TriggerConditionClose, TriggerConditionOpen, TriggerIntent, TriggerListParams, TriggerListResponse, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen, TriggerMarketOpenAttachedTrigger, TriggerOutcome, TriggerStatus, TriggerTWAP, TriggerTWAPAdjust, TriggerTWAPClose, TriggerTriggeredPublicData, TypedDataPayload, UnifiedAccountResponse, UnknownExternalFill, UpdateAutoRebalanceConfig, UpdateSavedBasketPayload, UpdateSavedBasketResponse, UpdateTradeAccount, UpdateUserDisplayName, UpdateUserDisplayNameResponse, UpdateUserPreferences, UpdateUserPreferencesResponse, UpdateVaultMetadata, UpdateVaultMetadataResponse, UpdateVaultMetadataResult, UserEventData, UserEventTopic, UserPreferences, UserProfile, Vault, VaultClosedPosition, VaultClosedPositionLeg, VaultClosedPositionListParams, VaultClosedPositionListResponse, VaultDataset, VaultEvent, VaultEventListParams, VaultEventListResponse, VaultInvalidatedData, VaultInvestmentsQueryParams, VaultInvestmentsResponse, VaultListParams, VaultListResponse, VaultOpenPosition, VaultOpenPositionLeg, VaultOpenPositionListParams, VaultOpenPositionListResponse, VaultOverviewResponse, VaultRequestIssue, VaultResponse, VaultServiceError, VaultStatsQueryParams, VaultStatsResponse, VaultStatus, VaultTradeAccountStatus, VaultTradeAccountStatusResponse, VaultsOverviewQueryParams, VerifyEmailRequest, VerifyEmailResponse, ViewerCopyStatus, VolumeStatistics, VolumeStatisticsQueryParams, VolumeStatisticsResponse, WATERMARK_FUTURE_SKEW_MS, WalletLoginRequest, WebsocketAckFrame, WebsocketChannel, WebsocketControlMessage, WebsocketErrorCode, WebsocketErrorFrame, WebsocketEventFrame, WebsocketFrame, WebsocketPongFrame, WebsocketPublicChannel, WebsocketPublicParams, WebsocketRequestErrorCode, WebsocketRequestId, WebsocketTriggerEventsParams, WebsocketUserEventsParams, WebsocketVaultErrorCode, WebsocketVaultEventsParams, WebsocketWelcomeFrame, WeightMap, WithdrawToEvm, WithdrawToEvmResponse, WithdrawToEvmResult, getStaticLogicalIssues, getTrailingDeltaIssues, getTrailingLogicalIssues, hasOrderedValidityWindow, isAttachTriggerMarketCloseTrailing, isPublicVaultDataset };
7695
+ export { AccountModeResponse, Activity, ActivityItemResponse, ActivityResponse, AdjustIsolatedMargin, AdjustIsolatedMarginResponse, AgentApprove, AgentApproveResponse, AgentApproveResult, ApiKeyMeResponse, ApiKeyScope, ApiKeySummary, ApplicableFill, ApplicableFillAssignment, ApplicableMetadata, ApplicablePosition, AppliedFeeDiscount, AttachTriggerMarketClose, AttachTriggerMarketCloseList, AttachTriggerMarketCloseStatic, AttachTriggerMarketCloseTrailing, AuthenticatedUser, AutoRebalanceBetaState, AutoRebalanceConfig, AutoRebalanceListParams, AutoRebalanceListResponse, AutoRebalancePausedReason, AutoRebalanceStatus, AutoRebalanceTimeframe, AutoRebalanceWeightSource, BaseExecution, BasketMarket, BindReferralCode, BoundReferralReferee, BracketType, BuilderFeeApproval, BulkSnapshotPoint, BulkSnapshotsResponse, CancelAllSchedulesResponse, CancelAllTriggersResponse, CancelLadderResponse, CancelScheduleResponse, CancelTriggerResponse, ChangeLighterAccountTierParams, ChangeLighterAccountTierResult, ChangePasswordRequest, ChangePasswordResponse, ClosedPosition, ClosedPositionLeg, ClosedPositionLegSide, ClosedPositionListParams, ClosedPositionListResponse, ConnectedIdentity, Connector, CopyAccountPerformance, CopyActivity, CopyActivityLeg, CopyActivityListParams, CopyActivityListResponse, CopyActivityOutcome, CopyActivityState, CopyActivityTWAP, CopyActivityTWAPReduction, CopyCaptureTiming, CopyControlTransferReason, CopyCoverage, CopyEndCapture, CopyEndCaptureStatus, CopyEndedSubscriptionWithVolume, CopyExecutionSource, CopyFollower, CopyFollowerStats, CopyFollowersResponse, CopyHealthResponse, CopyJoinResult, CopyLeaderAction, CopyManagedPosition, CopyPerformance, CopyPnlBreakdown, CopySizing, CopySkipReason, CopyStartSnapshot, CopyStartingAccount, CopyStateResponse, CopyStatsParams, CopyStatsResponse, CopySubscription, CopySubscriptionListQuery, CopySubscriptionListResponse, CopySubscriptionMetrics, CopySubscriptionRead, CopySubscriptionResponse, CopySubscriptionStatus, CopySubscriptionWithMetrics, CopyUnmanagedFollowerPositionReason, CopyUnmanagedPosition, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyWithMessageResult, CreateApplicablesMeta, CreateApplicablesRequest, CreateAuthTokenParams, CreateAuthTokenResult, CreateAutoRebalanceConfig, CreateAutoRebalanceResponse, CreateCopySubscription, CreateCopySubscriptionResponse, CreateFundingPaymentsRequest, CreateLadder, CreateLadderMarketOpen, CreateLadderResponse, CreateLighterApiKeyParams, CreateLighterSubAccountParams, CreateLighterSubAccountResult, CreateLighterUdaParams, CreateLighterUdaResult, CreateMarketAdjust, CreateMarketClose, CreateMarketCloseAll, CreateMarketOpen, CreateMarketReverse, CreateReferralCode, CreateRewardClaim, CreateSavedBasketPayload, CreateSavedBasketResponse, CreateSchedule, CreateScheduleResponse, CreateTWAPClose, CreateTWAPOpen, CreateTradeAccount, CreateTradeAdjust, CreateTradeAdjustResponse, CreateTradeClose, CreateTradeCloseAll, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpen, CreateTradeOpenResponse, CreateTradeReverse, CreateTradeReverseResponse, CreateTriggerClose, CreateTriggerConditionAttachStatic, CreateTriggerConditionAttachTrailing, CreateTriggerConditionCloseStatic, CreateTriggerConditionCloseTrailing, CreateTriggerConditionOpen, CreateTriggerMarketAdjust, CreateTriggerMarketClose, CreateTriggerMarketCloseStatic, CreateTriggerMarketCloseTrailing, CreateTriggerMarketOpen, CreateTriggerOpen, CreateTriggerResponse, CreateTriggerTWAPAdjust, CreateTriggerTWAPClose, CreateTriggerTWAPCloseStatic, CreateTriggerTWAPCloseTrailing, CreateVault, CreateVaultTradeAccount, CreatedVaultResponse, CreatedVaultResult, DEFAULT_TWAP_RANDOMIZATION, DisconnectXResponse, DiscountRate, EmailLoginRequest, EmailRegisterRequest, EndCopySubscriptionResponse, EthereumAddress2 as EthereumAddress, EthereumTransactionHash, ExchangeCredentialsResponse, ExchangeXLoginRequest, Execution, ExecutionErrorCode, ExecutionFulfillment, ExecutionIntent, ExecutionLegMode, ExecutionListParams, ExecutionListResponse, ExecutionOrderType, ExecutionRefusedLeg, ExecutionRefusedLegErrorCode, ExecutionStatus, ExternalPosition, ExternalTrigger, ExternalTriggerSource, FINAL_TWAP_SLICE_START_HEADROOM_SEC, FeeBps, FeeConnector, FeeDiscountScope, FeeOverrideScope, FeeRecipientResponse, FeeResponse, FeeRole, Fill, FillAssignment, FillListParams, FillListResponse, FillOrderBy, FillStatus, ForgotPasswordRequest, ForgotPasswordResponse, FundingInfo, FundingPaymentEntry, FundingQueryParams, FundingResponse, FundingUpdatedData, GetExecutionResponse, GetFeeRecipientParams, bundle_exports as HttpTypes, Instrument, InstrumentFundingMap, InstrumentId, InstrumentListLiteResponse, InstrumentListParams, InstrumentListResponse, InstrumentLite, InstrumentMarginMode, InstrumentPrecision, InstrumentPriceMap, InstrumentScope, InstrumentSymbolToIdMapResponse, InstrumentTradeability, InstrumentTradeabilityReason, InstrumentTradeabilityStatus, InstrumentType, LEADERBOARD_MAX_LIMIT, Ladder, LadderConditionOpen, LadderConfig, LadderListParams, LadderListResponse, LadderResponse, LadderStatus, LeaderSignedAction, LeaderboardArchiveListResponse, LeaderboardArchiveParams, LeaderboardArchivePeriodParams, LeaderboardArchiveResponse, LeaderboardQueryParams, LeaderboardResponse, LeaderboardRow, LeaderboardSnapshotParams, LeaderboardSnapshotQueryParams, LeaderboardSnapshotResponse, LeaderboardSortBy, LeaderboardStatus, LighterAccountTier, LighterUdaResolution, LighterUdaTransaction, LinkEmailRequest, LinkEmailResponse, LinkWalletRequest, LinkWalletResponse, ListApiKeysOutput, ListLighterUdaDepositsParams, ListLighterUdaDepositsResult, ListRewardClaimsQuery, LoginMethod, LoginRequest, LoginResponse, LogoutRequest, LogoutResponse, MARKET_BASKET_POSITION_COUNTS_MAX_BASKETS, MAX_FEE_BPS, MAX_TWAP_DURATION_SEC, MAX_VAULTS_PER_CONNECTION, MIN_TWAP_SLICE_INTERVAL_SEC, ManagementVaultDataset, ManagementVaultInvalidatedData, MarginMode, MarkNotificationUnreadPayload, MarkNotificationUnreadResponse, MarkNotificationsReadPayload, MarkNotificationsReadResponse, Market, MarketAdjustExecution, MarketBasketPositionCounts, MarketBasketPositionCountsPayload, MarketBasketPositionCountsResponse, MarketBasketsQueryParams, MarketBasketsResponse, MarketCloseExecution, MarketExecution, MarketOpenExecution, MarketOrder, MarketReverseExecution, MarketTotals, MarketsQueryParams, MarketsResponse, MeResponse, MetricTrack, NavBucket, NavBucketPoint, NavRangeQueryParams, NavRangeResponse, NavResolution, NavSnapshot, NavSnapshotResponse, NavStatsQueryParams, NavStatsResponse, NavStatsWindow, Notification, NotificationCategory, NotificationListParams, NotificationListResponse, NotificationMetric, NotificationParameters, NullableNumber, ORDERED_VALIDITY_WINDOW_MESSAGE, OauthGrant, OauthGrantsResponse, OauthInteractionClient, OauthInteractionConfirmRequest, OauthInteractionDetailsResponse, OauthInteractionRedirectResponse, OiStatistics, OiStatisticsQueryParams, OiStatisticsResponse, OpenPosition, OpenPositionLeg, OpenPositionListParams, OpenPositionListResponse, OracleTrigger, OracleUnit, OracleValue, Order, OrderStatus, PendingReferralReferee, PortfolioAnalyticsConfig, PortfolioAnalyticsInterval, PortfolioAnalyticsQuery, PortfolioAnalyticsResponse, PortfolioCashflowAmounts, PortfolioCashflowIntervals, PortfolioCashflowSeriesPoint, PortfolioClosedPositionStats, PortfolioOpenSnapshot, PortfolioPairBreakdown, PortfolioQuery, PortfolioResponse, PortfolioSource, PortfolioVolumeAmounts, PortfolioVolumeIntervals, PortfolioVolumeSeriesPoint, Position, PositionClosedReason, PositionEntryPrices, PositionExposure, PositionFill, PositionFillListResponse, PositionInitialExposureUSD, PositionListParams, PositionListResponse, PositionOrigin, PositionStatus, PositionStep, PositionStepLeg, PositionTotalFundingPayment, PositiveAmount, PrepareApproveIntegratorParams, PrepareApproveIntegratorResult, PrepareLighterFastWithdrawParams, PrepareLighterFastWithdrawResult, PriceSource, PriceUpdatedData, PricesQueryParams, PricesResponse, ProfileResponse, PublicClosedPosition, PublicLadder, PublicOpenPosition, PublicSchedule, PublicTradeLeg, PublicTraderClosedPositionsParams, PublicTraderClosedPositionsResponse, PublicTraderParams, PublicTraderQuery, PublicTraderResponse, PublicTrigger, PublicVaultDataset, PublicVaultInvalidatedData, QuoteFeeParams, RealtimeFunding, RealtimePrice, RebalanceEvent, RebalanceEventListParams, RebalanceEventListResponse, RebalanceEventStatus, RebalanceManual, RebalanceManualResponse, RecommendedBasket, RecommendedBasketLeg, RecommendedBasketListResponse, ReferralReferee, ReferralRefereeListParams, ReferralRefereeListResponse, ReferralStatusResponse, RefineStaticLogicalRules, RefineTrailingConfig, RefineTrailingLogicalRules, RefreshSessionResponse, RefreshTokenRequest, RefreshTokenResponse, RegisterEmailResponse, ReplaceAutoRebalanceConfig, RequestNonceRequest, RequestNonceResponse, ResendVerificationForRegisterRequest, ResendVerificationResponse, ResetPasswordRequest, ResetPasswordResponse, ResizeBehavior, RewardAccrual, RewardAccrualResponse, RewardClaimId, RewardClaimListResponse, RewardClaimResponse, RewardClaimStatus, RewardClaimStatusResponse, RewardPayoutAvailability, RewardSourceAccrual, RewardSummaryResponse, SavedBasket, SavedBasketLeg, SavedBasketListResponse, Schedule, ScheduleCancelledReason, ScheduleDetailParams, ScheduleDetailResponse, ScheduleExecutionType, ScheduleFailedReason, ScheduleFailure, ScheduleIntent, ScheduleListParams, ScheduleListResponse, ScheduleSlice, ScheduleStatus, ScheduleStrategy, SearchTriggersParams, SearchTriggersResponse, SetAccountMode, SetLeverage, SetLeverageResponse, SetLighterSubAccountMetadataParams, SetTrader, SetTraderResponse, SetTraderResult, SetUnifiedAccount, SetXVisibilityRequest, SetXVisibilityResponse, SnapshotsBulk, SparklinePoint, SparklineRange, StartXLinkRequest, StartXLinkResponse, StartXLoginRequest, StartXLoginResponse, StatisticsTotals, StatisticsTotalsQueryParams, StatisticsTotalsResponse, StpearFeePricing, SubmitApproveIntegratorParams, SubmitApproveIntegratorResult, SubmitChangePubKeyParams, SubmitChangePubKeyResult, SubmitLighterFastWithdrawParams, SubmitLighterFastWithdrawResult, SyncCredentialsRejectionReason, SyncMeta, SyncRefreshResponse, TWAPClose, TWAPOpen, TWAPRandomization, TcaBenchmarkResponse, TcaExecutionResponse, TcaExecutionSummaryContextResponse, TcaExecutionSummaryLegResponse, TcaExecutionSummaryResponse, TcaFillMetricResponse, TcaMetricStatus, TcaPositionQueryParams, TcaPositionResponse, TcaSummaryQueryParams, TcaSummaryResponse, TcaSummaryTotalsResponse, TcaTimingGranularity, TpSlBracketType, TradeAccount, TradeAccountListParams, TradeAccountListResponse, TradeAccountResponse, TradeExecutedData, TradeFill, TradeGroup, TradeLeg, TradeLegPostOnly, TradeLegPostOnlyWithMaxImpactPrice, TradeLegWithMaxImpactPrice, TradeListParams, TradeListResponse, TradePositionEffect, TradePositionState, TradeRealization, TraderPerformancePoint, TraderPerformanceQuery, TraderPerformanceResponse, Trailing, TrailingConfig, TrailingMode, TransferLighterSubAccountParams, TransferLighterSubAccountResult, Trigger, TriggerCancelledReason, TriggerConditionAdjust, TriggerConditionClose, TriggerConditionOpen, TriggerIntent, TriggerListParams, TriggerListResponse, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen, TriggerMarketOpenAttachedTrigger, TriggerOutcome, TriggerStatus, TriggerTWAP, TriggerTWAPAdjust, TriggerTWAPClose, TriggerTriggeredPublicData, TypedDataPayload, UnifiedAccountResponse, UnknownExternalFill, UpdateAutoRebalanceConfig, UpdateSavedBasketPayload, UpdateSavedBasketResponse, UpdateTradeAccount, UpdateUserDisplayName, UpdateUserDisplayNameResponse, UpdateUserPreferences, UpdateUserPreferencesResponse, UpdateVaultMetadata, UpdateVaultMetadataResponse, UpdateVaultMetadataResult, UserEventData, UserEventTopic, UserPreferences, UserProfile, Vault, VaultAccountMode, VaultClosedPosition, VaultClosedPositionLeg, VaultClosedPositionListParams, VaultClosedPositionListResponse, VaultDataset, VaultEvent, VaultEventListParams, VaultEventListResponse, VaultInvalidatedData, VaultInvestmentsQueryParams, VaultInvestmentsResponse, VaultListParams, VaultListResponse, VaultOpenPosition, VaultOpenPositionLeg, VaultOpenPositionListParams, VaultOpenPositionListResponse, VaultOverviewResponse, VaultRequestIssue, VaultResponse, VaultServiceError, VaultStatsQueryParams, VaultStatsResponse, VaultStatus, VaultTradeAccountStatus, VaultTradeAccountStatusResponse, VaultsOverviewQueryParams, VerifyEmailRequest, VerifyEmailResponse, ViewerCopyStatus, VolumeStatistics, VolumeStatisticsQueryParams, VolumeStatisticsResponse, WATERMARK_FUTURE_SKEW_MS, WalletLoginRequest, WebsocketAckFrame, WebsocketChannel, WebsocketControlMessage, WebsocketErrorCode, WebsocketErrorFrame, WebsocketEventFrame, WebsocketFrame, WebsocketPongFrame, WebsocketPublicChannel, WebsocketPublicParams, WebsocketRequestErrorCode, WebsocketRequestId, WebsocketTriggerEventsParams, WebsocketUserEventsParams, WebsocketVaultErrorCode, WebsocketVaultEventsParams, WebsocketWelcomeFrame, WeightMap, WithdrawToEvm, WithdrawToEvmResponse, WithdrawToEvmResult, getStaticLogicalIssues, getTrailingDeltaIssues, getTrailingLogicalIssues, hasOrderedValidityWindow, isAttachTriggerMarketCloseTrailing, isPublicVaultDataset };
@@ -71,6 +71,7 @@ export declare const Instrument: z.ZodObject<{
71
71
  notional: z.ZodOptional<z.ZodObject<{
72
72
  min: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<number | undefined, number>>>>;
73
73
  max: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<number | undefined, number>>>>;
74
+ minBuffer: z.ZodOptional<z.ZodNumber>;
74
75
  }, z.core.$strip>>;
75
76
  }, z.core.$strip>;
76
77
  tradeability: z.ZodObject<{
@@ -38,6 +38,7 @@ export declare const InstrumentListResponse: z.ZodObject<{
38
38
  notional: z.ZodOptional<z.ZodObject<{
39
39
  min: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<number | undefined, number>>>>;
40
40
  max: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<number | undefined, number>>>>;
41
+ minBuffer: z.ZodOptional<z.ZodNumber>;
41
42
  }, z.core.$strip>>;
42
43
  }, z.core.$strip>;
43
44
  tradeability: z.ZodObject<{
@@ -14,6 +14,7 @@ export declare const InstrumentPrecision: z.ZodObject<{
14
14
  notional: z.ZodOptional<z.ZodObject<{
15
15
  min: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<number | undefined, number>>>>;
16
16
  max: z.ZodNullable<z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<number | undefined, number>>>>;
17
+ minBuffer: z.ZodOptional<z.ZodNumber>;
17
18
  }, z.core.$strip>>;
18
19
  }, z.core.$strip>;
19
20
  export type InstrumentPrecision = z.output<typeof InstrumentPrecision>;
@@ -38,6 +38,7 @@ export declare const NotificationCategory: z.ZodEnum<{
38
38
  COPY_FAILED: "COPY_FAILED";
39
39
  COPY_SUBSCRIPTION_STOPPED: "COPY_SUBSCRIPTION_STOPPED";
40
40
  COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
41
+ COPY_MARGIN_NOT_APPLIED: "COPY_MARGIN_NOT_APPLIED";
41
42
  POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
42
43
  TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
43
44
  TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
@@ -520,6 +521,10 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
520
521
  type: z.ZodLiteral<"copy_leverage_not_applied">;
521
522
  subscriptionId: z.ZodUUID;
522
523
  activityId: z.ZodUUID;
524
+ }, z.core.$strip>, z.ZodObject<{
525
+ type: z.ZodLiteral<"copy_margin_not_applied">;
526
+ subscriptionId: z.ZodUUID;
527
+ activityId: z.ZodUUID;
523
528
  }, z.core.$strip>, z.ZodObject<{
524
529
  type: z.ZodLiteral<"trigger_cancelled_position_resized">;
525
530
  triggerId: z.ZodUUID;
@@ -627,6 +632,7 @@ export declare const Notification: z.ZodObject<{
627
632
  COPY_FAILED: "COPY_FAILED";
628
633
  COPY_SUBSCRIPTION_STOPPED: "COPY_SUBSCRIPTION_STOPPED";
629
634
  COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
635
+ COPY_MARGIN_NOT_APPLIED: "COPY_MARGIN_NOT_APPLIED";
630
636
  POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
631
637
  TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
632
638
  TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
@@ -1090,6 +1096,10 @@ export declare const Notification: z.ZodObject<{
1090
1096
  type: z.ZodLiteral<"copy_leverage_not_applied">;
1091
1097
  subscriptionId: z.ZodUUID;
1092
1098
  activityId: z.ZodUUID;
1099
+ }, z.core.$strip>, z.ZodObject<{
1100
+ type: z.ZodLiteral<"copy_margin_not_applied">;
1101
+ subscriptionId: z.ZodUUID;
1102
+ activityId: z.ZodUUID;
1093
1103
  }, z.core.$strip>, z.ZodObject<{
1094
1104
  type: z.ZodLiteral<"trigger_cancelled_position_resized">;
1095
1105
  triggerId: z.ZodUUID;
@@ -22,6 +22,7 @@ export declare const NotificationListResponse: z.ZodObject<{
22
22
  COPY_FAILED: "COPY_FAILED";
23
23
  COPY_SUBSCRIPTION_STOPPED: "COPY_SUBSCRIPTION_STOPPED";
24
24
  COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
25
+ COPY_MARGIN_NOT_APPLIED: "COPY_MARGIN_NOT_APPLIED";
25
26
  POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
26
27
  TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
27
28
  TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
@@ -485,6 +486,10 @@ export declare const NotificationListResponse: z.ZodObject<{
485
486
  type: z.ZodLiteral<"copy_leverage_not_applied">;
486
487
  subscriptionId: z.ZodUUID;
487
488
  activityId: z.ZodUUID;
489
+ }, z.core.$strip>, z.ZodObject<{
490
+ type: z.ZodLiteral<"copy_margin_not_applied">;
491
+ subscriptionId: z.ZodUUID;
492
+ activityId: z.ZodUUID;
488
493
  }, z.core.$strip>, z.ZodObject<{
489
494
  type: z.ZodLiteral<"trigger_cancelled_position_resized">;
490
495
  triggerId: z.ZodUUID;
@@ -41,52 +41,6 @@ export declare const PositionListResponse: z.ZodObject<{
41
41
  }, z.core.$strip>>;
42
42
  }, z.core.$strip>;
43
43
  export type PositionListResponse = z.output<typeof PositionListResponse>;
44
- export declare const OpenPositionLite: z.ZodObject<{
45
- id: z.ZodUUID;
46
- copySubscriptionId: z.ZodOptional<z.ZodUUID>;
47
- positionKey: z.ZodString;
48
- createdAt: z.ZodISODateTime;
49
- exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
50
- status: z.ZodLiteral<"OPEN">;
51
- origin: z.ZodEnum<{
52
- PARTIAL: "PARTIAL";
53
- PEAR: "PEAR";
54
- EXTERNAL: "EXTERNAL";
55
- }>;
56
- connector: z.ZodEnum<{
57
- hyperliquid: "hyperliquid";
58
- binance: "binance";
59
- bybit: "bybit";
60
- okx: "okx";
61
- lighter: "lighter";
62
- lighter_rhc: "lighter_rhc";
63
- }>;
64
- }, z.core.$strip>;
65
- export declare const OpenPositionLiteListResponse: z.ZodObject<{
66
- positions: z.ZodArray<z.ZodObject<{
67
- id: z.ZodUUID;
68
- copySubscriptionId: z.ZodOptional<z.ZodUUID>;
69
- positionKey: z.ZodString;
70
- createdAt: z.ZodISODateTime;
71
- exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
72
- status: z.ZodLiteral<"OPEN">;
73
- origin: z.ZodEnum<{
74
- PARTIAL: "PARTIAL";
75
- PEAR: "PEAR";
76
- EXTERNAL: "EXTERNAL";
77
- }>;
78
- connector: z.ZodEnum<{
79
- hyperliquid: "hyperliquid";
80
- binance: "binance";
81
- bybit: "bybit";
82
- okx: "okx";
83
- lighter: "lighter";
84
- lighter_rhc: "lighter_rhc";
85
- }>;
86
- }, z.core.$strip>>;
87
- }, z.core.$strip>;
88
- export type OpenPositionLite = z.output<typeof OpenPositionLite>;
89
- export type OpenPositionLiteListResponse = z.output<typeof OpenPositionLiteListResponse>;
90
44
  /**
91
45
  * A page of closed positions.
92
46
  *
@@ -458,6 +458,8 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
458
458
  "rebalance.paused": "rebalance.paused";
459
459
  "rebalance.cancelled": "rebalance.cancelled";
460
460
  "notification.created": "notification.created";
461
+ "import.started": "import.started";
462
+ "import.completed": "import.completed";
461
463
  }>;
462
464
  data: z.ZodObject<{
463
465
  entityId: z.ZodString;
@@ -914,6 +916,8 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
914
916
  "rebalance.paused": "rebalance.paused";
915
917
  "rebalance.cancelled": "rebalance.cancelled";
916
918
  "notification.created": "notification.created";
919
+ "import.started": "import.started";
920
+ "import.completed": "import.completed";
917
921
  }>;
918
922
  data: z.ZodObject<{
919
923
  entityId: z.ZodString;
@@ -40,6 +40,8 @@ export declare const WebsocketUserEventsParams: z.ZodObject<{
40
40
  "rebalance.paused": "rebalance.paused";
41
41
  "rebalance.cancelled": "rebalance.cancelled";
42
42
  "notification.created": "notification.created";
43
+ "import.started": "import.started";
44
+ "import.completed": "import.completed";
43
45
  }>>>;
44
46
  }, z.core.$strict>;
45
47
  export type WebsocketUserEventsParams = z.output<typeof WebsocketUserEventsParams>;
@@ -117,6 +119,8 @@ export declare const WebsocketControlMessage: z.ZodDiscriminatedUnion<[z.ZodObje
117
119
  "rebalance.paused": "rebalance.paused";
118
120
  "rebalance.cancelled": "rebalance.cancelled";
119
121
  "notification.created": "notification.created";
122
+ "import.started": "import.started";
123
+ "import.completed": "import.completed";
120
124
  }>>>;
121
125
  }, z.core.$strict>>;
122
126
  }, z.core.$strip>, z.ZodObject<{
@@ -195,6 +199,8 @@ export declare const WebsocketControlMessage: z.ZodDiscriminatedUnion<[z.ZodObje
195
199
  "rebalance.paused": "rebalance.paused";
196
200
  "rebalance.cancelled": "rebalance.cancelled";
197
201
  "notification.created": "notification.created";
202
+ "import.started": "import.started";
203
+ "import.completed": "import.completed";
198
204
  }>>>;
199
205
  }, z.core.$strict>>;
200
206
  }, z.core.$strip>, z.ZodObject<{
@@ -23,6 +23,8 @@ export declare const UserEventTopic: z.ZodEnum<{
23
23
  "rebalance.paused": "rebalance.paused";
24
24
  "rebalance.cancelled": "rebalance.cancelled";
25
25
  "notification.created": "notification.created";
26
+ "import.started": "import.started";
27
+ "import.completed": "import.completed";
26
28
  }>;
27
29
  export type UserEventTopic = z.infer<typeof UserEventTopic>;
28
30
  /** Invalidation-only payload of a `user_events` frame: the client refetches the named entity. */
@@ -25,14 +25,6 @@ export declare const UnknownExternalFill: z.ZodObject<{
25
25
  mark: z.ZodString;
26
26
  }, z.core.$strip>>;
27
27
  }, z.core.$strip>;
28
- export declare const SyncFillsSinceRequest: z.ZodObject<{
29
- overlapMs: z.ZodNumber;
30
- }, z.core.$strip>;
31
- export declare const SyncFundingSinceRequest: z.ZodObject<{
32
- overlapMs: z.ZodNumber;
33
- }, z.core.$strip>;
34
- export type SyncFillsSinceRequest = z.output<typeof SyncFillsSinceRequest>;
35
- export type SyncFundingSinceRequest = z.output<typeof SyncFundingSinceRequest>;
36
28
  export type UnknownExternalFill = z.output<typeof UnknownExternalFill>;
37
29
  /**
38
30
  * An exchange-reported open position snapshot. The exchange position API is the
@@ -177,16 +169,7 @@ export declare const CreateApplicablesMeta: z.ZodObject<{
177
169
  }, z.core.$strip>;
178
170
  export type CreateApplicablesMeta = z.output<typeof CreateApplicablesMeta>;
179
171
  /**
180
- * Plain multipart fields posted beside the gzipped create payload on the bulk route.
181
- * Core forwards the gzip unread, so any meta its own admission gates need must travel
182
- * outside it; multipart fields arrive as strings.
183
- */
184
- export declare const CreateApplicablesBulkFields: z.ZodObject<{
185
- executionsUpdatedAtEpochMs: z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>;
186
- }, z.core.$strip>;
187
- export type CreateApplicablesBulkFields = z.output<typeof CreateApplicablesBulkFields>;
188
- /**
189
- * POST /sync/create request — the discover+apply phase of the cycle.
172
+ * The create payload the syncer hands the execute-create workflow — the discover+apply phase of the cycle.
190
173
  * - applicables: baskets keyed by positionKey, find-or-created during apply.
191
174
  * - exchangePositions: the exchange snapshot, enforced source of truth at verify.
192
175
  * - meta: cycle metadata (watermark, first-sync pre-fetch boundary).
@@ -296,7 +279,7 @@ export declare const FundingPaymentEntry: z.ZodObject<{
296
279
  }, z.core.$strip>;
297
280
  export type FundingPaymentEntry = z.output<typeof FundingPaymentEntry>;
298
281
  /**
299
- * POST /sync/funding/create request — funding events since the watermark plus the
282
+ * The funding payload the syncer hands the create-funding-payments workflow — funding events since the watermark plus the
300
283
  * cycle watermark. Rows upsert idempotently on (account, connector, instrument, ts).
301
284
  */
302
285
  export declare const CreateFundingPaymentsRequest: z.ZodObject<{
@@ -1,16 +1,14 @@
1
1
  import { z } from 'zod';
2
- export declare const SyncFillsResponse: z.ZodObject<{}, z.core.$strip>;
3
- export declare const SyncFillsSinceResponse: z.ZodObject<{
4
- sinceMs: z.ZodNumber;
2
+ export declare const SyncCredentialsRejectionReason: z.ZodEnum<{
3
+ "venue-account-missing": "venue-account-missing";
4
+ "credentials-invalid": "credentials-invalid";
5
+ }>;
6
+ export type SyncCredentialsRejectionReason = z.output<typeof SyncCredentialsRejectionReason>;
7
+ export declare const SyncRefreshResponse: z.ZodObject<{
5
8
  neverSynced: z.ZodBoolean;
6
- firstSyncStartedAt: z.ZodOptional<z.ZodNumber>;
7
- confirmedExchangeFillIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
- hasPendingSynthetics: z.ZodOptional<z.ZodBoolean>;
9
- executionsUpdatedAtEpochMs: z.ZodNumber;
9
+ credentialsRejection: z.ZodOptional<z.ZodEnum<{
10
+ "venue-account-missing": "venue-account-missing";
11
+ "credentials-invalid": "credentials-invalid";
12
+ }>>;
10
13
  }, z.core.$strip>;
11
- export declare const SyncFundingSinceResponse: z.ZodObject<{
12
- sinceMs: z.ZodNumber;
13
- }, z.core.$strip>;
14
- export type SyncFillsResponse = z.output<typeof SyncFillsResponse>;
15
- export type SyncFillsSinceResponse = z.output<typeof SyncFillsSinceResponse>;
16
- export type SyncFundingSinceResponse = z.output<typeof SyncFundingSinceResponse>;
14
+ export type SyncRefreshResponse = z.output<typeof SyncRefreshResponse>;
@@ -95,6 +95,27 @@ export declare const SetUnifiedAccount: z.ZodObject<{
95
95
  }, z.core.$strict>;
96
96
  export type SetUnifiedAccountInput = z.input<typeof SetUnifiedAccount>;
97
97
  export type SetUnifiedAccount = z.infer<typeof SetUnifiedAccount>;
98
+ /** The Hyperliquid account modes a vault agent may run in; both draw perp margin from spot. */
99
+ export declare const VaultAccountMode: z.ZodEnum<{
100
+ unifiedAccount: "unifiedAccount";
101
+ portfolioMargin: "portfolioMargin";
102
+ }>;
103
+ export type VaultAccountMode = z.infer<typeof VaultAccountMode>;
104
+ /**
105
+ * Set-account-mode is leader-signed and signs the requested mode, so a signature for one mode can
106
+ * never be replayed to set the other.
107
+ */
108
+ export declare const SetAccountMode: z.ZodObject<{
109
+ signature: z.ZodString;
110
+ nonce: z.ZodString;
111
+ deadline: z.ZodNumber;
112
+ mode: z.ZodEnum<{
113
+ unifiedAccount: "unifiedAccount";
114
+ portfolioMargin: "portfolioMargin";
115
+ }>;
116
+ }, z.core.$strict>;
117
+ export type SetAccountModeInput = z.input<typeof SetAccountMode>;
118
+ export type SetAccountMode = z.infer<typeof SetAccountMode>;
98
119
  /** Builder-fee approval carried by the vault account provisioning workflow. */
99
120
  export declare const BuilderFeeApproval: z.ZodObject<{
100
121
  builderAddress: z.ZodPipe<z.ZodString, z.ZodTransform<EthereumAddress, string>>;
@@ -392,6 +392,14 @@ export declare const UnifiedAccountResponse: z.ZodObject<{
392
392
  agentAddress: z.ZodString;
393
393
  }, z.core.$strip>;
394
394
  export type UnifiedAccountResponse = z.infer<typeof UnifiedAccountResponse>;
395
+ export declare const AccountModeResponse: z.ZodObject<{
396
+ agentAddress: z.ZodString;
397
+ mode: z.ZodEnum<{
398
+ unifiedAccount: "unifiedAccount";
399
+ portfolioMargin: "portfolioMargin";
400
+ }>;
401
+ }, z.core.$strip>;
402
+ export type AccountModeResponse = z.infer<typeof AccountModeResponse>;
395
403
  export declare const NavRangeResponse: z.ZodObject<{
396
404
  points: z.ZodArray<z.ZodObject<{
397
405
  bucket: z.ZodISODateTime;
@@ -513,6 +521,8 @@ export type VaultRequestIssue = z.infer<typeof VaultRequestIssue>;
513
521
  export declare const VaultServiceError: z.ZodDiscriminatedUnion<[z.ZodObject<{
514
522
  error: z.ZodLiteral<"UNAUTHORIZED">;
515
523
  reason: z.ZodString;
524
+ }, z.core.$strip>, z.ZodObject<{
525
+ error: z.ZodLiteral<"CREATOR_NOT_APPROVED">;
516
526
  }, z.core.$strip>, z.ZodObject<{
517
527
  error: z.ZodLiteral<"NOT_OWNER">;
518
528
  vaultAddress: z.ZodString;
@@ -545,6 +555,26 @@ export declare const VaultServiceError: z.ZodDiscriminatedUnion<[z.ZodObject<{
545
555
  }, z.core.$strip>, z.ZodObject<{
546
556
  error: z.ZodLiteral<"HL_SET_ABSTRACTION_FAILED">;
547
557
  incidentId: z.ZodString;
558
+ }, z.core.$strip>, z.ZodObject<{
559
+ error: z.ZodLiteral<"HL_ACCOUNT_MODE_REFUSED">;
560
+ vaultAddress: z.ZodString;
561
+ mode: z.ZodEnum<{
562
+ unifiedAccount: "unifiedAccount";
563
+ portfolioMargin: "portfolioMargin";
564
+ }>;
565
+ reason: z.ZodString;
566
+ }, z.core.$strip>, z.ZodObject<{
567
+ error: z.ZodLiteral<"HL_ACCOUNT_MODE_NOT_APPLIED">;
568
+ vaultAddress: z.ZodString;
569
+ requested: z.ZodEnum<{
570
+ unifiedAccount: "unifiedAccount";
571
+ portfolioMargin: "portfolioMargin";
572
+ }>;
573
+ applied: z.ZodString;
574
+ }, z.core.$strip>, z.ZodObject<{
575
+ error: z.ZodLiteral<"AGENT_HAS_OPEN_POSITIONS">;
576
+ vaultAddress: z.ZodString;
577
+ openPositions: z.ZodNumber;
548
578
  }, z.core.$strip>, z.ZodObject<{
549
579
  error: z.ZodLiteral<"EVM_OPERATION_FAILED">;
550
580
  vaultAddress: z.ZodString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "2.25.0",
3
+ "version": "2.27.0",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",