@uniswap/client-trading 0.8.5 → 0.9.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.
@@ -8916,46 +8916,6 @@ export declare class MarginPositionRow extends Message<MarginPositionRow> {
8916
8916
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): MarginPositionRow;
8917
8917
  static equals(a: MarginPositionRow | PlainMessage<MarginPositionRow> | undefined, b: MarginPositionRow | PlainMessage<MarginPositionRow> | undefined): boolean;
8918
8918
  }
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
8919
  /**
8960
8920
  * The one plan-store read, and a deliberately weaker guarantee than the rest of
8961
8921
  * this response: session-scoped and TTL-bound, so absent rather than wrong once
@@ -8969,17 +8929,45 @@ export declare class MarginPendingPlan extends Message<MarginPendingPlan> {
8969
8929
  */
8970
8930
  planId: string;
8971
8931
  /**
8932
+ * Epoch milliseconds. proto3 JSON renders an int64 as a string, which is what
8933
+ * the client reads it as; it does not sort on the value.
8934
+ *
8972
8935
  * @generated from field: int64 created_at = 2;
8973
8936
  */
8974
8937
  createdAt: bigint;
8975
8938
  /**
8939
+ * 0-based index of the first step that is not COMPLETE.
8940
+ *
8976
8941
  * @generated from field: int32 current_step = 3;
8977
8942
  */
8978
8943
  currentStep: number;
8979
8944
  /**
8945
+ * False once an in-progress step carries a proof: that transaction may have
8946
+ * landed, so cancelling could strand a position the plan no longer tracks.
8947
+ *
8980
8948
  * @generated from field: bool cancellable = 4;
8981
8949
  */
8982
8950
  cancellable: boolean;
8951
+ /**
8952
+ * @generated from field: string market_key = 5;
8953
+ */
8954
+ marketKey: string;
8955
+ /**
8956
+ * @generated from field: trading.v1.MarginVenue venue = 6;
8957
+ */
8958
+ venue: MarginVenue;
8959
+ /**
8960
+ * @generated from field: string collateral_token = 7;
8961
+ */
8962
+ collateralToken: string;
8963
+ /**
8964
+ * @generated from field: string debt_token = 8;
8965
+ */
8966
+ debtToken: string;
8967
+ /**
8968
+ * @generated from field: int32 step_count = 9;
8969
+ */
8970
+ stepCount: number;
8983
8971
  constructor(data?: PartialMessage<MarginPendingPlan>);
8984
8972
  static readonly runtime: typeof proto3;
8985
8973
  static readonly typeName = "trading.v1.MarginPendingPlan";
@@ -9048,14 +9036,11 @@ export declare class MarginPositionsResponse extends Message<MarginPositionsResp
9048
9036
  */
9049
9037
  nextCursor?: string;
9050
9038
  /**
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.
9039
+ * 4 was incomplete_opens, deleted unpopulated before launch (#13445).
9040
+ * Serializes as [] when the read ran and found nothing. It cannot express
9041
+ * "not read": a degraded read logs a warning and reports empty, matching how
9042
+ * the markets feed degrades a failed venue.
9054
9043
  *
9055
- * @generated from field: repeated trading.v1.MarginIncompleteOpen incomplete_opens = 4;
9056
- */
9057
- incompleteOpens: MarginIncompleteOpen[];
9058
- /**
9059
9044
  * @generated from field: repeated trading.v1.MarginPendingPlan pending_plans = 5;
9060
9045
  */
9061
9046
  pendingPlans: MarginPendingPlan[];
@@ -10235,59 +10235,6 @@ MarginPositionRow.fields = proto3.util.newFieldList(() => [
10235
10235
  { no: 21, name: "exit_price", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10236
10236
  { no: 22, name: "realized_pnl", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
10237
10237
  ]);
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
10238
  /**
10292
10239
  * The one plan-store read, and a deliberately weaker guarantee than the rest of
10293
10240
  * this response: session-scoped and TTL-bound, so absent rather than wrong once
@@ -10303,17 +10250,45 @@ export class MarginPendingPlan extends Message {
10303
10250
  */
10304
10251
  this.planId = "";
10305
10252
  /**
10253
+ * Epoch milliseconds. proto3 JSON renders an int64 as a string, which is what
10254
+ * the client reads it as; it does not sort on the value.
10255
+ *
10306
10256
  * @generated from field: int64 created_at = 2;
10307
10257
  */
10308
10258
  this.createdAt = protoInt64.zero;
10309
10259
  /**
10260
+ * 0-based index of the first step that is not COMPLETE.
10261
+ *
10310
10262
  * @generated from field: int32 current_step = 3;
10311
10263
  */
10312
10264
  this.currentStep = 0;
10313
10265
  /**
10266
+ * False once an in-progress step carries a proof: that transaction may have
10267
+ * landed, so cancelling could strand a position the plan no longer tracks.
10268
+ *
10314
10269
  * @generated from field: bool cancellable = 4;
10315
10270
  */
10316
10271
  this.cancellable = false;
10272
+ /**
10273
+ * @generated from field: string market_key = 5;
10274
+ */
10275
+ this.marketKey = "";
10276
+ /**
10277
+ * @generated from field: trading.v1.MarginVenue venue = 6;
10278
+ */
10279
+ this.venue = MarginVenue.MORPHO;
10280
+ /**
10281
+ * @generated from field: string collateral_token = 7;
10282
+ */
10283
+ this.collateralToken = "";
10284
+ /**
10285
+ * @generated from field: string debt_token = 8;
10286
+ */
10287
+ this.debtToken = "";
10288
+ /**
10289
+ * @generated from field: int32 step_count = 9;
10290
+ */
10291
+ this.stepCount = 0;
10317
10292
  proto3.util.initPartial(data, this);
10318
10293
  }
10319
10294
  static fromBinary(bytes, options) {
@@ -10336,6 +10311,11 @@ MarginPendingPlan.fields = proto3.util.newFieldList(() => [
10336
10311
  { no: 2, name: "created_at", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
10337
10312
  { no: 3, name: "current_step", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
10338
10313
  { no: 4, name: "cancellable", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
10314
+ { no: 5, name: "market_key", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10315
+ { no: 6, name: "venue", kind: "enum", T: proto3.getEnumType(MarginVenue) },
10316
+ { no: 7, name: "collateral_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10317
+ { no: 8, name: "debt_token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10318
+ { no: 9, name: "step_count", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
10339
10319
  ]);
10340
10320
  /**
10341
10321
  * @generated from message trading.v1.MarginPositionsRequest
@@ -10390,14 +10370,11 @@ export class MarginPositionsResponse extends Message {
10390
10370
  */
10391
10371
  this.positions = [];
10392
10372
  /**
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.
10373
+ * 4 was incomplete_opens, deleted unpopulated before launch (#13445).
10374
+ * Serializes as [] when the read ran and found nothing. It cannot express
10375
+ * "not read": a degraded read logs a warning and reports empty, matching how
10376
+ * the markets feed degrades a failed venue.
10396
10377
  *
10397
- * @generated from field: repeated trading.v1.MarginIncompleteOpen incomplete_opens = 4;
10398
- */
10399
- this.incompleteOpens = [];
10400
- /**
10401
10378
  * @generated from field: repeated trading.v1.MarginPendingPlan pending_plans = 5;
10402
10379
  */
10403
10380
  this.pendingPlans = [];
@@ -10422,6 +10399,5 @@ MarginPositionsResponse.fields = proto3.util.newFieldList(() => [
10422
10399
  { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
10423
10400
  { no: 2, name: "positions", kind: "message", T: MarginPositionRow, repeated: true },
10424
10401
  { 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
10402
  { no: 5, name: "pending_plans", kind: "message", T: MarginPendingPlan, repeated: true },
10427
10403
  ]);
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.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },