@uniswap/client-trading 0.11.11 → 0.11.13

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.
@@ -1,5 +1,5 @@
1
1
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
2
- import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
2
+ import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
3
3
  /**
4
4
  * @generated from rpc trading.v1.tradingService.Quote
5
5
  */
@@ -350,3 +350,17 @@ export declare const marginPositions: {
350
350
  readonly typeName: "trading.v1.tradingService";
351
351
  };
352
352
  };
353
+ /**
354
+ * @generated from rpc trading.v1.tradingService.MarginPositionActivity
355
+ */
356
+ export declare const marginPositionActivity: {
357
+ readonly localName: "marginPositionActivity";
358
+ readonly name: "MarginPositionActivity";
359
+ readonly kind: MethodKind.Unary;
360
+ readonly I: typeof MarginPositionActivityRequest;
361
+ readonly O: typeof MarginPositionActivityResponse;
362
+ readonly idempotency: MethodIdempotency.NoSideEffects;
363
+ readonly service: {
364
+ readonly typeName: "trading.v1.tradingService";
365
+ };
366
+ };
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
6
- import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
6
+ import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
7
7
  /**
8
8
  * @generated from rpc trading.v1.tradingService.Quote
9
9
  */
@@ -354,3 +354,17 @@ export const marginPositions = {
354
354
  typeName: "trading.v1.tradingService"
355
355
  }
356
356
  };
357
+ /**
358
+ * @generated from rpc trading.v1.tradingService.MarginPositionActivity
359
+ */
360
+ export const marginPositionActivity = {
361
+ localName: "marginPositionActivity",
362
+ name: "MarginPositionActivity",
363
+ kind: MethodKind.Unary,
364
+ I: MarginPositionActivityRequest,
365
+ O: MarginPositionActivityResponse,
366
+ idempotency: MethodIdempotency.NoSideEffects,
367
+ service: {
368
+ typeName: "trading.v1.tradingService"
369
+ }
370
+ };
@@ -1,4 +1,4 @@
1
- import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
1
+ import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
2
2
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
3
3
  /**
4
4
  * @generated from service trading.v1.tradingService
@@ -256,5 +256,15 @@ export declare const tradingService: {
256
256
  readonly kind: MethodKind.Unary;
257
257
  readonly idempotency: MethodIdempotency.NoSideEffects;
258
258
  };
259
+ /**
260
+ * @generated from rpc trading.v1.tradingService.MarginPositionActivity
261
+ */
262
+ readonly marginPositionActivity: {
263
+ readonly name: "MarginPositionActivity";
264
+ readonly I: typeof MarginPositionActivityRequest;
265
+ readonly O: typeof MarginPositionActivityResponse;
266
+ readonly kind: MethodKind.Unary;
267
+ readonly idempotency: MethodIdempotency.NoSideEffects;
268
+ };
259
269
  };
260
270
  };
@@ -2,7 +2,7 @@
2
2
  // @generated from file trading/v1/api.proto (package trading.v1, syntax proto3)
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
- import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
5
+ import { CheckApproval4337Request, CheckApproval4337Response, CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, GetTokensRequest, GetTokensResponse, MarginMarketsRequest, MarginMarketsResponse, MarginPositionActivityRequest, MarginPositionActivityResponse, MarginPositionsRequest, MarginPositionsResponse, MarginQuoteRequest, MarginQuoteResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, SupportedChainsRequest, SupportedChainsResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
6
6
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
7
7
  /**
8
8
  * @generated from service trading.v1.tradingService
@@ -260,5 +260,15 @@ export const tradingService = {
260
260
  kind: MethodKind.Unary,
261
261
  idempotency: MethodIdempotency.NoSideEffects,
262
262
  },
263
+ /**
264
+ * @generated from rpc trading.v1.tradingService.MarginPositionActivity
265
+ */
266
+ marginPositionActivity: {
267
+ name: "MarginPositionActivity",
268
+ I: MarginPositionActivityRequest,
269
+ O: MarginPositionActivityResponse,
270
+ kind: MethodKind.Unary,
271
+ idempotency: MethodIdempotency.NoSideEffects,
272
+ },
263
273
  }
264
274
  };
@@ -853,6 +853,56 @@ export declare enum MarginPositionStatus {
853
853
  */
854
854
  PARTIALLY_LIQUIDATED = 3
855
855
  }
856
+ /**
857
+ * @generated from enum trading.v1.MarginActivityKind
858
+ */
859
+ export declare enum MarginActivityKind {
860
+ /**
861
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_UNSPECIFIED = 0;
862
+ */
863
+ UNSPECIFIED = 0,
864
+ /**
865
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_OPEN = 1;
866
+ */
867
+ OPEN = 1,
868
+ /**
869
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_INCREASE = 2;
870
+ */
871
+ INCREASE = 2,
872
+ /**
873
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_DECREASE = 3;
874
+ */
875
+ DECREASE = 3,
876
+ /**
877
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_ADD_EQUITY = 4;
878
+ */
879
+ ADD_EQUITY = 4,
880
+ /**
881
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_WITHDRAW_EQUITY = 5;
882
+ */
883
+ WITHDRAW_EQUITY = 5,
884
+ /**
885
+ * A liquidation, partial or full. A full one also ends the lifecycle.
886
+ *
887
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_LIQUIDATION = 6;
888
+ */
889
+ LIQUIDATION = 6,
890
+ /**
891
+ * The end of the lifecycle by any other means, or, after a liquidation that
892
+ * left nothing, the end that liquidation caused, found at the reopen.
893
+ *
894
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_CLOSE = 7;
895
+ */
896
+ CLOSE = 7,
897
+ /**
898
+ * The position moved by a flow the store could not attribute, such as an
899
+ * owner action outside the router or a re-anchor to the chain: no amounts,
900
+ * only the position it left.
901
+ *
902
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_ADJUSTMENT = 8;
903
+ */
904
+ ADJUSTMENT = 8
905
+ }
856
906
  /**
857
907
  * Bridge vendor serving a bridge route.
858
908
  *
@@ -6502,6 +6552,14 @@ export declare class TruncatedPlanStep extends Message<TruncatedPlanStep> {
6502
6552
  * @generated from field: optional double price_difference = 7;
6503
6553
  */
6504
6554
  priceDifference?: number;
6555
+ /**
6556
+ * The vendor currently winning a bridge step, ACROSS included; absent on
6557
+ * FASTEST previews, which quote no bridge. Indicative: plan creation re-runs
6558
+ * the competition.
6559
+ *
6560
+ * @generated from field: optional trading.v1.BridgeProvider bridge_provider = 8;
6561
+ */
6562
+ bridgeProvider?: BridgeProvider;
6505
6563
  constructor(data?: PartialMessage<TruncatedPlanStep>);
6506
6564
  static readonly runtime: typeof proto3;
6507
6565
  static readonly typeName = "trading.v1.TruncatedPlanStep";
@@ -9193,11 +9251,13 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
9193
9251
  */
9194
9252
  collateralAtOpen?: string;
9195
9253
  /**
9196
- * Partial decreases, oldest first, the newest 50.
9254
+ * From the position store: the lifecycle whose every event
9255
+ * `GET /margin/positions/activity` serves. Absent for a position the store
9256
+ * has not indexed, or indexed before it kept lifecycles.
9197
9257
  *
9198
- * @generated from field: repeated trading.v1.MarginDecreaseActivity decreases = 29;
9258
+ * @generated from field: optional string activity_id = 37;
9199
9259
  */
9200
- decreases: MarginDecreaseActivity[];
9260
+ activityId?: string;
9201
9261
  /**
9202
9262
  * ACTIVE only, raw DEBT-token units. The basis of the equity still in the
9203
9263
  * position, each deposit valued at the venue's oracle mark at its event: each
@@ -9223,47 +9283,6 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
9223
9283
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPositionRow;
9224
9284
  static equals(a: MarginPositionRow | PlainMessage<MarginPositionRow> | undefined, b: MarginPositionRow | PlainMessage<MarginPositionRow> | undefined): boolean;
9225
9285
  }
9226
- /**
9227
- * @generated from message trading.v1.MarginDecreaseActivity
9228
- */
9229
- export declare class MarginDecreaseActivity extends Message<MarginDecreaseActivity> {
9230
- /**
9231
- * @generated from field: string tx_hash = 1;
9232
- */
9233
- txHash: string;
9234
- /**
9235
- * Epoch milliseconds, like `opened_at`.
9236
- *
9237
- * @generated from field: int64 at = 2;
9238
- */
9239
- at: bigint;
9240
- /**
9241
- * Raw debt-token units.
9242
- *
9243
- * @generated from field: string debt_repaid = 3;
9244
- */
9245
- debtRepaid: string;
9246
- /**
9247
- * Raw collateral-token units.
9248
- *
9249
- * @generated from field: string collateral_sold = 4;
9250
- */
9251
- collateralSold: string;
9252
- /**
9253
- * In the same terms as the row's `entry_price`. Absent when nothing was sold.
9254
- *
9255
- * @generated from field: optional string exit_price = 5;
9256
- */
9257
- exitPrice?: string;
9258
- constructor(data?: PartialMessage<MarginDecreaseActivity>);
9259
- static readonly runtime: typeof proto3;
9260
- static readonly typeName = "trading.v1.MarginDecreaseActivity";
9261
- static readonly fields: FieldList;
9262
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginDecreaseActivity;
9263
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginDecreaseActivity;
9264
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginDecreaseActivity;
9265
- static equals(a: MarginDecreaseActivity | PlainMessage<MarginDecreaseActivity> | undefined, b: MarginDecreaseActivity | PlainMessage<MarginDecreaseActivity> | undefined): boolean;
9266
- }
9267
9286
  /**
9268
9287
  * The one plan-store read, and a deliberately weaker guarantee than the rest of
9269
9288
  * this response: session-scoped and TTL-bound, so absent rather than wrong once
@@ -9402,3 +9421,149 @@ export declare class MarginPositionsResponse extends Message<MarginPositionsResp
9402
9421
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPositionsResponse;
9403
9422
  static equals(a: MarginPositionsResponse | PlainMessage<MarginPositionsResponse> | undefined, b: MarginPositionsResponse | PlainMessage<MarginPositionsResponse> | undefined): boolean;
9404
9423
  }
9424
+ /**
9425
+ * One event of a position's lifecycle, as the position store folded it.
9426
+ *
9427
+ * @generated from message trading.v1.MarginActivity
9428
+ */
9429
+ export declare class MarginActivity extends Message<MarginActivity> {
9430
+ /**
9431
+ * @generated from field: trading.v1.MarginActivityKind kind = 1;
9432
+ */
9433
+ kind: MarginActivityKind;
9434
+ /**
9435
+ * @generated from field: string tx_hash = 2;
9436
+ */
9437
+ txHash: string;
9438
+ /**
9439
+ * Epoch milliseconds, like `opened_at`.
9440
+ *
9441
+ * @generated from field: int64 at = 3;
9442
+ */
9443
+ at: bigint;
9444
+ /**
9445
+ * Raw collateral-token units bought, and raw debt-token units drawn for them.
9446
+ *
9447
+ * @generated from field: optional string collateral_bought = 4;
9448
+ */
9449
+ collateralBought?: string;
9450
+ /**
9451
+ * @generated from field: optional string debt_drawn = 5;
9452
+ */
9453
+ debtDrawn?: string;
9454
+ /**
9455
+ * A partial decrease: raw collateral-token units sold, raw debt-token units
9456
+ * repaid.
9457
+ *
9458
+ * @generated from field: optional string collateral_sold = 6;
9459
+ */
9460
+ collateralSold?: string;
9461
+ /**
9462
+ * @generated from field: optional string debt_repaid = 7;
9463
+ */
9464
+ debtRepaid?: string;
9465
+ /**
9466
+ * Raw collateral-token units the owner put in or took out, as the row's
9467
+ * `deposited_equity` counts them: a move of the debt token at the venue's
9468
+ * mark.
9469
+ *
9470
+ * @generated from field: optional string equity_deposited = 8;
9471
+ */
9472
+ equityDeposited?: string;
9473
+ /**
9474
+ * @generated from field: optional string equity_withdrawn = 9;
9475
+ */
9476
+ equityWithdrawn?: string;
9477
+ /**
9478
+ * The fill of the event's buy, sale, close or full liquidation, in the same
9479
+ * terms as the row's `entry_price`. Absent when the event has none.
9480
+ *
9481
+ * @generated from field: optional string price = 10;
9482
+ */
9483
+ price?: string;
9484
+ /**
9485
+ * The position as the event left it: raw collateral-token and debt-token
9486
+ * units, and its entry price in the same terms as the row's `entry_price`,
9487
+ * absent until the lifecycle has bought.
9488
+ *
9489
+ * @generated from field: string collateral_after = 11;
9490
+ */
9491
+ collateralAfter: string;
9492
+ /**
9493
+ * @generated from field: string debt_after = 12;
9494
+ */
9495
+ debtAfter: string;
9496
+ /**
9497
+ * @generated from field: optional string entry_price = 13;
9498
+ */
9499
+ entryPrice?: string;
9500
+ constructor(data?: PartialMessage<MarginActivity>);
9501
+ static readonly runtime: typeof proto3;
9502
+ static readonly typeName = "trading.v1.MarginActivity";
9503
+ static readonly fields: FieldList;
9504
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginActivity;
9505
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginActivity;
9506
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginActivity;
9507
+ static equals(a: MarginActivity | PlainMessage<MarginActivity> | undefined, b: MarginActivity | PlainMessage<MarginActivity> | undefined): boolean;
9508
+ }
9509
+ /**
9510
+ * @generated from message trading.v1.MarginPositionActivityRequest
9511
+ */
9512
+ export declare class MarginPositionActivityRequest extends Message<MarginPositionActivityRequest> {
9513
+ /**
9514
+ * A `MarginPositionRow.activity_id`.
9515
+ *
9516
+ * @generated from field: string activity_id = 1;
9517
+ */
9518
+ activityId: string;
9519
+ /**
9520
+ * Opaque; echo `next_cursor` back verbatim with the same `activity_id`.
9521
+ *
9522
+ * @generated from field: optional string cursor = 2;
9523
+ */
9524
+ cursor?: string;
9525
+ /**
9526
+ * Default and max 50.
9527
+ *
9528
+ * @generated from field: optional int32 limit = 3;
9529
+ */
9530
+ limit?: number;
9531
+ constructor(data?: PartialMessage<MarginPositionActivityRequest>);
9532
+ static readonly runtime: typeof proto3;
9533
+ static readonly typeName = "trading.v1.MarginPositionActivityRequest";
9534
+ static readonly fields: FieldList;
9535
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginPositionActivityRequest;
9536
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginPositionActivityRequest;
9537
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPositionActivityRequest;
9538
+ static equals(a: MarginPositionActivityRequest | PlainMessage<MarginPositionActivityRequest> | undefined, b: MarginPositionActivityRequest | PlainMessage<MarginPositionActivityRequest> | undefined): boolean;
9539
+ }
9540
+ /**
9541
+ * @generated from message trading.v1.MarginPositionActivityResponse
9542
+ */
9543
+ export declare class MarginPositionActivityResponse extends Message<MarginPositionActivityResponse> {
9544
+ /**
9545
+ * @generated from field: string request_id = 1;
9546
+ */
9547
+ requestId: string;
9548
+ /**
9549
+ * Oldest first. Empty for an activity id the store holds nothing for.
9550
+ *
9551
+ * @generated from field: repeated trading.v1.MarginActivity activity = 2;
9552
+ */
9553
+ activity: MarginActivity[];
9554
+ /**
9555
+ * Absent on the last page. Present means more entries may exist, never that
9556
+ * the next page is non-empty.
9557
+ *
9558
+ * @generated from field: optional string next_cursor = 3;
9559
+ */
9560
+ nextCursor?: string;
9561
+ constructor(data?: PartialMessage<MarginPositionActivityResponse>);
9562
+ static readonly runtime: typeof proto3;
9563
+ static readonly typeName = "trading.v1.MarginPositionActivityResponse";
9564
+ static readonly fields: FieldList;
9565
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginPositionActivityResponse;
9566
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginPositionActivityResponse;
9567
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPositionActivityResponse;
9568
+ static equals(a: MarginPositionActivityResponse | PlainMessage<MarginPositionActivityResponse> | undefined, b: MarginPositionActivityResponse | PlainMessage<MarginPositionActivityResponse> | undefined): boolean;
9569
+ }
@@ -1148,6 +1148,69 @@ proto3.util.setEnumType(MarginPositionStatus, "trading.v1.MarginPositionStatus",
1148
1148
  { no: 2, name: "LIQUIDATED" },
1149
1149
  { no: 3, name: "PARTIALLY_LIQUIDATED" },
1150
1150
  ]);
1151
+ /**
1152
+ * @generated from enum trading.v1.MarginActivityKind
1153
+ */
1154
+ export var MarginActivityKind;
1155
+ (function (MarginActivityKind) {
1156
+ /**
1157
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_UNSPECIFIED = 0;
1158
+ */
1159
+ MarginActivityKind[MarginActivityKind["UNSPECIFIED"] = 0] = "UNSPECIFIED";
1160
+ /**
1161
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_OPEN = 1;
1162
+ */
1163
+ MarginActivityKind[MarginActivityKind["OPEN"] = 1] = "OPEN";
1164
+ /**
1165
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_INCREASE = 2;
1166
+ */
1167
+ MarginActivityKind[MarginActivityKind["INCREASE"] = 2] = "INCREASE";
1168
+ /**
1169
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_DECREASE = 3;
1170
+ */
1171
+ MarginActivityKind[MarginActivityKind["DECREASE"] = 3] = "DECREASE";
1172
+ /**
1173
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_ADD_EQUITY = 4;
1174
+ */
1175
+ MarginActivityKind[MarginActivityKind["ADD_EQUITY"] = 4] = "ADD_EQUITY";
1176
+ /**
1177
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_WITHDRAW_EQUITY = 5;
1178
+ */
1179
+ MarginActivityKind[MarginActivityKind["WITHDRAW_EQUITY"] = 5] = "WITHDRAW_EQUITY";
1180
+ /**
1181
+ * A liquidation, partial or full. A full one also ends the lifecycle.
1182
+ *
1183
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_LIQUIDATION = 6;
1184
+ */
1185
+ MarginActivityKind[MarginActivityKind["LIQUIDATION"] = 6] = "LIQUIDATION";
1186
+ /**
1187
+ * The end of the lifecycle by any other means, or, after a liquidation that
1188
+ * left nothing, the end that liquidation caused, found at the reopen.
1189
+ *
1190
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_CLOSE = 7;
1191
+ */
1192
+ MarginActivityKind[MarginActivityKind["CLOSE"] = 7] = "CLOSE";
1193
+ /**
1194
+ * The position moved by a flow the store could not attribute, such as an
1195
+ * owner action outside the router or a re-anchor to the chain: no amounts,
1196
+ * only the position it left.
1197
+ *
1198
+ * @generated from enum value: MARGIN_ACTIVITY_KIND_ADJUSTMENT = 8;
1199
+ */
1200
+ MarginActivityKind[MarginActivityKind["ADJUSTMENT"] = 8] = "ADJUSTMENT";
1201
+ })(MarginActivityKind || (MarginActivityKind = {}));
1202
+ // Retrieve enum metadata with: proto3.getEnumType(MarginActivityKind)
1203
+ proto3.util.setEnumType(MarginActivityKind, "trading.v1.MarginActivityKind", [
1204
+ { no: 0, name: "MARGIN_ACTIVITY_KIND_UNSPECIFIED" },
1205
+ { no: 1, name: "MARGIN_ACTIVITY_KIND_OPEN" },
1206
+ { no: 2, name: "MARGIN_ACTIVITY_KIND_INCREASE" },
1207
+ { no: 3, name: "MARGIN_ACTIVITY_KIND_DECREASE" },
1208
+ { no: 4, name: "MARGIN_ACTIVITY_KIND_ADD_EQUITY" },
1209
+ { no: 5, name: "MARGIN_ACTIVITY_KIND_WITHDRAW_EQUITY" },
1210
+ { no: 6, name: "MARGIN_ACTIVITY_KIND_LIQUIDATION" },
1211
+ { no: 7, name: "MARGIN_ACTIVITY_KIND_CLOSE" },
1212
+ { no: 8, name: "MARGIN_ACTIVITY_KIND_ADJUSTMENT" },
1213
+ ]);
1151
1214
  /**
1152
1215
  * Bridge vendor serving a bridge route.
1153
1216
  *
@@ -7532,6 +7595,7 @@ TruncatedPlanStep.fields = proto3.util.newFieldList(() => [
7532
7595
  { no: 5, name: "token_out_chain_id", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
7533
7596
  { no: 6, name: "slippage", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
7534
7597
  { no: 7, name: "price_difference", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
7598
+ { no: 8, name: "bridge_provider", kind: "enum", T: proto3.getEnumType(BridgeProvider), opt: true },
7535
7599
  ]);
7536
7600
  /**
7537
7601
  * @generated from message trading.v1.ChainedQuote
@@ -10325,12 +10389,6 @@ export class MarginPositionRow extends Message {
10325
10389
  * @generated from field: string account = 34;
10326
10390
  */
10327
10391
  this.account = "";
10328
- /**
10329
- * Partial decreases, oldest first, the newest 50.
10330
- *
10331
- * @generated from field: repeated trading.v1.MarginDecreaseActivity decreases = 29;
10332
- */
10333
- this.decreases = [];
10334
10392
  proto3.util.initPartial(data, this);
10335
10393
  }
10336
10394
  static fromBinary(bytes, options) {
@@ -10381,62 +10439,10 @@ MarginPositionRow.fields = proto3.util.newFieldList(() => [
10381
10439
  { no: 26, name: "close_tx_hash", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10382
10440
  { no: 27, name: "last_liquidation_tx_hash", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10383
10441
  { no: 28, name: "collateral_at_open", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10384
- { no: 29, name: "decreases", kind: "message", T: MarginDecreaseActivity, repeated: true },
10442
+ { no: 37, name: "activity_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10385
10443
  { no: 30, name: "cost_basis_in_debt", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10386
10444
  { no: 31, name: "realized_pnl_to_date_in_debt", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10387
10445
  ]);
10388
- /**
10389
- * @generated from message trading.v1.MarginDecreaseActivity
10390
- */
10391
- export class MarginDecreaseActivity extends Message {
10392
- constructor(data) {
10393
- super();
10394
- /**
10395
- * @generated from field: string tx_hash = 1;
10396
- */
10397
- this.txHash = "";
10398
- /**
10399
- * Epoch milliseconds, like `opened_at`.
10400
- *
10401
- * @generated from field: int64 at = 2;
10402
- */
10403
- this.at = protoInt64.zero;
10404
- /**
10405
- * Raw debt-token units.
10406
- *
10407
- * @generated from field: string debt_repaid = 3;
10408
- */
10409
- this.debtRepaid = "";
10410
- /**
10411
- * Raw collateral-token units.
10412
- *
10413
- * @generated from field: string collateral_sold = 4;
10414
- */
10415
- this.collateralSold = "";
10416
- proto3.util.initPartial(data, this);
10417
- }
10418
- static fromBinary(bytes, options) {
10419
- return new MarginDecreaseActivity().fromBinary(bytes, options);
10420
- }
10421
- static fromJson(jsonValue, options) {
10422
- return new MarginDecreaseActivity().fromJson(jsonValue, options);
10423
- }
10424
- static fromJsonString(jsonString, options) {
10425
- return new MarginDecreaseActivity().fromJsonString(jsonString, options);
10426
- }
10427
- static equals(a, b) {
10428
- return proto3.util.equals(MarginDecreaseActivity, a, b);
10429
- }
10430
- }
10431
- MarginDecreaseActivity.runtime = proto3;
10432
- MarginDecreaseActivity.typeName = "trading.v1.MarginDecreaseActivity";
10433
- MarginDecreaseActivity.fields = proto3.util.newFieldList(() => [
10434
- { no: 1, name: "tx_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10435
- { no: 2, name: "at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
10436
- { no: 3, name: "debt_repaid", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10437
- { no: 4, name: "collateral_sold", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10438
- { no: 5, name: "exit_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10439
- ]);
10440
10446
  /**
10441
10447
  * The one plan-store read, and a deliberately weaker guarantee than the rest of
10442
10448
  * this response: session-scoped and TTL-bound, so absent rather than wrong once
@@ -10611,3 +10617,141 @@ MarginPositionsResponse.fields = proto3.util.newFieldList(() => [
10611
10617
  { no: 3, name: "next_cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10612
10618
  { no: 5, name: "pending_plans", kind: "message", T: MarginPendingPlan, repeated: true },
10613
10619
  ]);
10620
+ /**
10621
+ * One event of a position's lifecycle, as the position store folded it.
10622
+ *
10623
+ * @generated from message trading.v1.MarginActivity
10624
+ */
10625
+ export class MarginActivity extends Message {
10626
+ constructor(data) {
10627
+ super();
10628
+ /**
10629
+ * @generated from field: trading.v1.MarginActivityKind kind = 1;
10630
+ */
10631
+ this.kind = MarginActivityKind.UNSPECIFIED;
10632
+ /**
10633
+ * @generated from field: string tx_hash = 2;
10634
+ */
10635
+ this.txHash = "";
10636
+ /**
10637
+ * Epoch milliseconds, like `opened_at`.
10638
+ *
10639
+ * @generated from field: int64 at = 3;
10640
+ */
10641
+ this.at = protoInt64.zero;
10642
+ /**
10643
+ * The position as the event left it: raw collateral-token and debt-token
10644
+ * units, and its entry price in the same terms as the row's `entry_price`,
10645
+ * absent until the lifecycle has bought.
10646
+ *
10647
+ * @generated from field: string collateral_after = 11;
10648
+ */
10649
+ this.collateralAfter = "";
10650
+ /**
10651
+ * @generated from field: string debt_after = 12;
10652
+ */
10653
+ this.debtAfter = "";
10654
+ proto3.util.initPartial(data, this);
10655
+ }
10656
+ static fromBinary(bytes, options) {
10657
+ return new MarginActivity().fromBinary(bytes, options);
10658
+ }
10659
+ static fromJson(jsonValue, options) {
10660
+ return new MarginActivity().fromJson(jsonValue, options);
10661
+ }
10662
+ static fromJsonString(jsonString, options) {
10663
+ return new MarginActivity().fromJsonString(jsonString, options);
10664
+ }
10665
+ static equals(a, b) {
10666
+ return proto3.util.equals(MarginActivity, a, b);
10667
+ }
10668
+ }
10669
+ MarginActivity.runtime = proto3;
10670
+ MarginActivity.typeName = "trading.v1.MarginActivity";
10671
+ MarginActivity.fields = proto3.util.newFieldList(() => [
10672
+ { no: 1, name: "kind", kind: "enum", T: proto3.getEnumType(MarginActivityKind) },
10673
+ { no: 2, name: "tx_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10674
+ { no: 3, name: "at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
10675
+ { no: 4, name: "collateral_bought", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10676
+ { no: 5, name: "debt_drawn", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10677
+ { no: 6, name: "collateral_sold", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10678
+ { no: 7, name: "debt_repaid", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10679
+ { no: 8, name: "equity_deposited", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10680
+ { no: 9, name: "equity_withdrawn", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10681
+ { no: 10, name: "price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10682
+ { no: 11, name: "collateral_after", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10683
+ { no: 12, name: "debt_after", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10684
+ { no: 13, name: "entry_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10685
+ ]);
10686
+ /**
10687
+ * @generated from message trading.v1.MarginPositionActivityRequest
10688
+ */
10689
+ export class MarginPositionActivityRequest extends Message {
10690
+ constructor(data) {
10691
+ super();
10692
+ /**
10693
+ * A `MarginPositionRow.activity_id`.
10694
+ *
10695
+ * @generated from field: string activity_id = 1;
10696
+ */
10697
+ this.activityId = "";
10698
+ proto3.util.initPartial(data, this);
10699
+ }
10700
+ static fromBinary(bytes, options) {
10701
+ return new MarginPositionActivityRequest().fromBinary(bytes, options);
10702
+ }
10703
+ static fromJson(jsonValue, options) {
10704
+ return new MarginPositionActivityRequest().fromJson(jsonValue, options);
10705
+ }
10706
+ static fromJsonString(jsonString, options) {
10707
+ return new MarginPositionActivityRequest().fromJsonString(jsonString, options);
10708
+ }
10709
+ static equals(a, b) {
10710
+ return proto3.util.equals(MarginPositionActivityRequest, a, b);
10711
+ }
10712
+ }
10713
+ MarginPositionActivityRequest.runtime = proto3;
10714
+ MarginPositionActivityRequest.typeName = "trading.v1.MarginPositionActivityRequest";
10715
+ MarginPositionActivityRequest.fields = proto3.util.newFieldList(() => [
10716
+ { no: 1, name: "activity_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10717
+ { no: 2, name: "cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10718
+ { no: 3, name: "limit", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
10719
+ ]);
10720
+ /**
10721
+ * @generated from message trading.v1.MarginPositionActivityResponse
10722
+ */
10723
+ export class MarginPositionActivityResponse extends Message {
10724
+ constructor(data) {
10725
+ super();
10726
+ /**
10727
+ * @generated from field: string request_id = 1;
10728
+ */
10729
+ this.requestId = "";
10730
+ /**
10731
+ * Oldest first. Empty for an activity id the store holds nothing for.
10732
+ *
10733
+ * @generated from field: repeated trading.v1.MarginActivity activity = 2;
10734
+ */
10735
+ this.activity = [];
10736
+ proto3.util.initPartial(data, this);
10737
+ }
10738
+ static fromBinary(bytes, options) {
10739
+ return new MarginPositionActivityResponse().fromBinary(bytes, options);
10740
+ }
10741
+ static fromJson(jsonValue, options) {
10742
+ return new MarginPositionActivityResponse().fromJson(jsonValue, options);
10743
+ }
10744
+ static fromJsonString(jsonString, options) {
10745
+ return new MarginPositionActivityResponse().fromJsonString(jsonString, options);
10746
+ }
10747
+ static equals(a, b) {
10748
+ return proto3.util.equals(MarginPositionActivityResponse, a, b);
10749
+ }
10750
+ }
10751
+ MarginPositionActivityResponse.runtime = proto3;
10752
+ MarginPositionActivityResponse.typeName = "trading.v1.MarginPositionActivityResponse";
10753
+ MarginPositionActivityResponse.fields = proto3.util.newFieldList(() => [
10754
+ { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10755
+ { no: 2, name: "activity", kind: "message", T: MarginActivity, repeated: true },
10756
+ { no: 3, name: "next_cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10757
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.11.11",
3
+ "version": "0.11.13",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },