@uniswap/client-trading 0.8.5 → 0.9.1

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.
@@ -7147,6 +7147,10 @@ export declare class PlanStep extends Message<PlanStep> {
7147
7147
  * @generated from field: optional double slippage = 24;
7148
7148
  */
7149
7149
  slippage?: number;
7150
+ /**
7151
+ * @generated from field: optional string gas_limit = 25;
7152
+ */
7153
+ gasLimit?: string;
7150
7154
  constructor(data?: PartialMessage<PlanStep>);
7151
7155
  static readonly runtime: typeof proto3;
7152
7156
  static readonly typeName = "trading.v1.PlanStep";
@@ -8916,46 +8920,6 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
8916
8920
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPositionRow;
8917
8921
  static equals(a: MarginPositionRow | PlainMessage<MarginPositionRow> | undefined, b: MarginPositionRow | PlainMessage<MarginPositionRow> | undefined): boolean;
8918
8922
  }
8919
- /**
8920
- * Collateral parked at a MarginAccount whose open never completed. Derived from
8921
- * the chain rather than the plan store, so it survives plan-row expiry and is
8922
- * visible from any device.
8923
- *
8924
- * @generated from message trading.v1.MarginIncompleteOpen
8925
- */
8926
- export declare class MarginIncompleteOpen extends Message<MarginIncompleteOpen> {
8927
- /**
8928
- * @generated from field: string account = 1;
8929
- */
8930
- account: string;
8931
- /**
8932
- * @generated from field: string sub_id = 2;
8933
- */
8934
- subId: string;
8935
- /**
8936
- * False when the account holds a balance but was never deployed, which is the
8937
- * window this surface exists for: pre-swap delivered, position not opened.
8938
- *
8939
- * @generated from field: bool deployed = 3;
8940
- */
8941
- deployed: boolean;
8942
- /**
8943
- * @generated from field: trading.v1.MarginTokenMetadata token = 4;
8944
- */
8945
- token?: MarginTokenMetadata;
8946
- /**
8947
- * @generated from field: string amount = 5;
8948
- */
8949
- amount: string;
8950
- constructor(data?: PartialMessage<MarginIncompleteOpen>);
8951
- static readonly runtime: typeof proto3;
8952
- static readonly typeName = "trading.v1.MarginIncompleteOpen";
8953
- static readonly fields: FieldList;
8954
- static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): MarginIncompleteOpen;
8955
- static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): MarginIncompleteOpen;
8956
- static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginIncompleteOpen;
8957
- static equals(a: MarginIncompleteOpen | PlainMessage<MarginIncompleteOpen> | undefined, b: MarginIncompleteOpen | PlainMessage<MarginIncompleteOpen> | undefined): boolean;
8958
- }
8959
8923
  /**
8960
8924
  * The one plan-store read, and a deliberately weaker guarantee than the rest of
8961
8925
  * this response: session-scoped and TTL-bound, so absent rather than wrong once
@@ -8969,17 +8933,45 @@ export declare class MarginPendingPlan extends Message<MarginPendingPlan> {
8969
8933
  */
8970
8934
  planId: string;
8971
8935
  /**
8936
+ * Epoch milliseconds. proto3 JSON renders an int64 as a string, which is what
8937
+ * the client reads it as; it does not sort on the value.
8938
+ *
8972
8939
  * @generated from field: int64 created_at = 2;
8973
8940
  */
8974
8941
  createdAt: bigint;
8975
8942
  /**
8943
+ * 0-based index of the first step that is not COMPLETE.
8944
+ *
8976
8945
  * @generated from field: int32 current_step = 3;
8977
8946
  */
8978
8947
  currentStep: number;
8979
8948
  /**
8949
+ * False once an in-progress step carries a proof: that transaction may have
8950
+ * landed, so cancelling could strand a position the plan no longer tracks.
8951
+ *
8980
8952
  * @generated from field: bool cancellable = 4;
8981
8953
  */
8982
8954
  cancellable: boolean;
8955
+ /**
8956
+ * @generated from field: string market_key = 5;
8957
+ */
8958
+ marketKey: string;
8959
+ /**
8960
+ * @generated from field: trading.v1.MarginVenue venue = 6;
8961
+ */
8962
+ venue: MarginVenue;
8963
+ /**
8964
+ * @generated from field: string collateral_token = 7;
8965
+ */
8966
+ collateralToken: string;
8967
+ /**
8968
+ * @generated from field: string debt_token = 8;
8969
+ */
8970
+ debtToken: string;
8971
+ /**
8972
+ * @generated from field: int32 step_count = 9;
8973
+ */
8974
+ stepCount: number;
8983
8975
  constructor(data?: PartialMessage<MarginPendingPlan>);
8984
8976
  static readonly runtime: typeof proto3;
8985
8977
  static readonly typeName = "trading.v1.MarginPendingPlan";
@@ -9048,14 +9040,11 @@ export declare class MarginPositionsResponse extends Message<MarginPositionsResp
9048
9040
  */
9049
9041
  nextCursor?: string;
9050
9042
  /**
9051
- * Both recovery surfaces serialize as [] when the read ran and found nothing.
9052
- * They cannot express "not read": a degraded read logs a warning and reports
9053
- * empty, matching how the markets feed degrades a failed venue.
9043
+ * 4 was incomplete_opens, deleted unpopulated before launch (#13445).
9044
+ * Serializes as [] when the read ran and found nothing. It cannot express
9045
+ * "not read": a degraded read logs a warning and reports empty, matching how
9046
+ * the markets feed degrades a failed venue.
9054
9047
  *
9055
- * @generated from field: repeated trading.v1.MarginIncompleteOpen incomplete_opens = 4;
9056
- */
9057
- incompleteOpens: MarginIncompleteOpen[];
9058
- /**
9059
9048
  * @generated from field: repeated trading.v1.MarginPendingPlan pending_plans = 5;
9060
9049
  */
9061
9050
  pendingPlans: MarginPendingPlan[];
@@ -8406,6 +8406,7 @@ PlanStep.fields = proto3.util.newFieldList(() => [
8406
8406
  { no: 22, name: "gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
8407
8407
  { no: 23, name: "routing_step_key", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
8408
8408
  { no: 24, name: "slippage", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
8409
+ { no: 25, name: "gas_limit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
8409
8410
  ]);
8410
8411
  /**
8411
8412
  * @generated from enum trading.v1.PlanStep.StepStatus
@@ -10235,59 +10236,6 @@ MarginPositionRow.fields = proto3.util.newFieldList(() => [
10235
10236
  { no: 21, name: "exit_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10236
10237
  { no: 22, name: "realized_pnl", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10237
10238
  ]);
10238
- /**
10239
- * Collateral parked at a MarginAccount whose open never completed. Derived from
10240
- * the chain rather than the plan store, so it survives plan-row expiry and is
10241
- * visible from any device.
10242
- *
10243
- * @generated from message trading.v1.MarginIncompleteOpen
10244
- */
10245
- export class MarginIncompleteOpen extends Message {
10246
- constructor(data) {
10247
- super();
10248
- /**
10249
- * @generated from field: string account = 1;
10250
- */
10251
- this.account = "";
10252
- /**
10253
- * @generated from field: string sub_id = 2;
10254
- */
10255
- this.subId = "";
10256
- /**
10257
- * False when the account holds a balance but was never deployed, which is the
10258
- * window this surface exists for: pre-swap delivered, position not opened.
10259
- *
10260
- * @generated from field: bool deployed = 3;
10261
- */
10262
- this.deployed = false;
10263
- /**
10264
- * @generated from field: string amount = 5;
10265
- */
10266
- this.amount = "";
10267
- proto3.util.initPartial(data, this);
10268
- }
10269
- static fromBinary(bytes, options) {
10270
- return new MarginIncompleteOpen().fromBinary(bytes, options);
10271
- }
10272
- static fromJson(jsonValue, options) {
10273
- return new MarginIncompleteOpen().fromJson(jsonValue, options);
10274
- }
10275
- static fromJsonString(jsonString, options) {
10276
- return new MarginIncompleteOpen().fromJsonString(jsonString, options);
10277
- }
10278
- static equals(a, b) {
10279
- return proto3.util.equals(MarginIncompleteOpen, a, b);
10280
- }
10281
- }
10282
- MarginIncompleteOpen.runtime = proto3;
10283
- MarginIncompleteOpen.typeName = "trading.v1.MarginIncompleteOpen";
10284
- MarginIncompleteOpen.fields = proto3.util.newFieldList(() => [
10285
- { no: 1, name: "account", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10286
- { no: 2, name: "sub_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10287
- { no: 3, name: "deployed", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
10288
- { no: 4, name: "token", kind: "message", T: MarginTokenMetadata },
10289
- { no: 5, name: "amount", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10290
- ]);
10291
10239
  /**
10292
10240
  * The one plan-store read, and a deliberately weaker guarantee than the rest of
10293
10241
  * this response: session-scoped and TTL-bound, so absent rather than wrong once
@@ -10303,17 +10251,45 @@ export class MarginPendingPlan extends Message {
10303
10251
  */
10304
10252
  this.planId = "";
10305
10253
  /**
10254
+ * Epoch milliseconds. proto3 JSON renders an int64 as a string, which is what
10255
+ * the client reads it as; it does not sort on the value.
10256
+ *
10306
10257
  * @generated from field: int64 created_at = 2;
10307
10258
  */
10308
10259
  this.createdAt = protoInt64.zero;
10309
10260
  /**
10261
+ * 0-based index of the first step that is not COMPLETE.
10262
+ *
10310
10263
  * @generated from field: int32 current_step = 3;
10311
10264
  */
10312
10265
  this.currentStep = 0;
10313
10266
  /**
10267
+ * False once an in-progress step carries a proof: that transaction may have
10268
+ * landed, so cancelling could strand a position the plan no longer tracks.
10269
+ *
10314
10270
  * @generated from field: bool cancellable = 4;
10315
10271
  */
10316
10272
  this.cancellable = false;
10273
+ /**
10274
+ * @generated from field: string market_key = 5;
10275
+ */
10276
+ this.marketKey = "";
10277
+ /**
10278
+ * @generated from field: trading.v1.MarginVenue venue = 6;
10279
+ */
10280
+ this.venue = MarginVenue.MORPHO;
10281
+ /**
10282
+ * @generated from field: string collateral_token = 7;
10283
+ */
10284
+ this.collateralToken = "";
10285
+ /**
10286
+ * @generated from field: string debt_token = 8;
10287
+ */
10288
+ this.debtToken = "";
10289
+ /**
10290
+ * @generated from field: int32 step_count = 9;
10291
+ */
10292
+ this.stepCount = 0;
10317
10293
  proto3.util.initPartial(data, this);
10318
10294
  }
10319
10295
  static fromBinary(bytes, options) {
@@ -10336,6 +10312,11 @@ MarginPendingPlan.fields = proto3.util.newFieldList(() => [
10336
10312
  { no: 2, name: "created_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
10337
10313
  { no: 3, name: "current_step", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
10338
10314
  { no: 4, name: "cancellable", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
10315
+ { no: 5, name: "market_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10316
+ { no: 6, name: "venue", kind: "enum", T: proto3.getEnumType(MarginVenue) },
10317
+ { no: 7, name: "collateral_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10318
+ { no: 8, name: "debt_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10319
+ { no: 9, name: "step_count", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
10339
10320
  ]);
10340
10321
  /**
10341
10322
  * @generated from message trading.v1.MarginPositionsRequest
@@ -10390,14 +10371,11 @@ export class MarginPositionsResponse extends Message {
10390
10371
  */
10391
10372
  this.positions = [];
10392
10373
  /**
10393
- * Both recovery surfaces serialize as [] when the read ran and found nothing.
10394
- * They cannot express "not read": a degraded read logs a warning and reports
10395
- * empty, matching how the markets feed degrades a failed venue.
10374
+ * 4 was incomplete_opens, deleted unpopulated before launch (#13445).
10375
+ * Serializes as [] when the read ran and found nothing. It cannot express
10376
+ * "not read": a degraded read logs a warning and reports empty, matching how
10377
+ * the markets feed degrades a failed venue.
10396
10378
  *
10397
- * @generated from field: repeated trading.v1.MarginIncompleteOpen incomplete_opens = 4;
10398
- */
10399
- this.incompleteOpens = [];
10400
- /**
10401
10379
  * @generated from field: repeated trading.v1.MarginPendingPlan pending_plans = 5;
10402
10380
  */
10403
10381
  this.pendingPlans = [];
@@ -10422,6 +10400,5 @@ MarginPositionsResponse.fields = proto3.util.newFieldList(() => [
10422
10400
  { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10423
10401
  { no: 2, name: "positions", kind: "message", T: MarginPositionRow, repeated: true },
10424
10402
  { no: 3, name: "next_cursor", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10425
- { no: 4, name: "incomplete_opens", kind: "message", T: MarginIncompleteOpen, repeated: true },
10426
10403
  { no: 5, name: "pending_plans", kind: "message", T: MarginPendingPlan, repeated: true },
10427
10404
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.8.5",
3
+ "version": "0.9.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },