@uniswap/client-unirpc-v2 0.0.3 → 0.0.5

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,32 @@
1
1
  import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
2
2
  import { Message, proto3, Value } from "@bufbuild/protobuf";
3
+ /**
4
+ * Level selects the server's tuned defaults for this chain at the chosen
5
+ * tier (NORMAL / FAST / URGENT). Required when an Urgency is present.
6
+ *
7
+ * LEVEL_UNSPECIFIED exists only to satisfy proto3's "enum must have a 0
8
+ * value" rule; sending it is a client error (400).
9
+ *
10
+ * @generated from enum uniswap.unirpc.v2.Level
11
+ */
12
+ export declare enum Level {
13
+ /**
14
+ * @generated from enum value: LEVEL_UNSPECIFIED = 0;
15
+ */
16
+ LEVEL_UNSPECIFIED = 0,
17
+ /**
18
+ * @generated from enum value: NORMAL = 1;
19
+ */
20
+ NORMAL = 1,
21
+ /**
22
+ * @generated from enum value: FAST = 2;
23
+ */
24
+ FAST = 2,
25
+ /**
26
+ * @generated from enum value: URGENT = 3;
27
+ */
28
+ URGENT = 3
29
+ }
3
30
  /**
4
31
  * @generated from enum uniswap.unirpc.v2.Chain
5
32
  */
@@ -154,7 +181,11 @@ export declare enum Chain {
154
181
  /**
155
182
  * @generated from enum value: CHAIN_LINEA = 59144;
156
183
  */
157
- LINEA = 59144
184
+ LINEA = 59144,
185
+ /**
186
+ * @generated from enum value: CHAIN_ARC = 5042;
187
+ */
188
+ ARC = 5042
158
189
  }
159
190
  /**
160
191
  * @generated from message uniswap.unirpc.v2.GasStrategy
@@ -205,6 +236,75 @@ export declare class GasStrategy extends Message<GasStrategy> {
205
236
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GasStrategy;
206
237
  static equals(a: GasStrategy | PlainMessage<GasStrategy> | undefined, b: GasStrategy | PlainMessage<GasStrategy> | undefined): boolean;
207
238
  }
239
+ /**
240
+ * GasOverrides are caller-supplied per-field substitutions for the
241
+ * server's computed quote. Values are decimal-string wei (not Gwei) for
242
+ * full precision. When supplied, each field is returned verbatim — the
243
+ * server does NOT silently lower or raise. A non-overridden field falls
244
+ * back to the market quote (priority) or to baseFee + priority (maxFee).
245
+ * The server enforces the EVM invariant maxFee >= priority and returns
246
+ * InvalidGasOverrides (400 BadRequest) on violation.
247
+ *
248
+ * @generated from message uniswap.unirpc.v2.GasOverrides
249
+ */
250
+ export declare class GasOverrides extends Message<GasOverrides> {
251
+ /**
252
+ * Priority fee (tip), in wei. Returned verbatim when set.
253
+ *
254
+ * wei
255
+ *
256
+ * @generated from field: optional string max_priority_fee_per_gas = 1;
257
+ */
258
+ maxPriorityFeePerGas?: string;
259
+ /**
260
+ * Total per-gas fee (= baseFee + priorityFee), in wei. Returned
261
+ * verbatim when set. If set together with max_priority_fee_per_gas, the
262
+ * pair must satisfy maxFee >= priority or the request is rejected.
263
+ *
264
+ * wei
265
+ *
266
+ * @generated from field: optional string max_fee_per_gas = 2;
267
+ */
268
+ maxFeePerGas?: string;
269
+ constructor(data?: PartialMessage<GasOverrides>);
270
+ static readonly runtime: typeof proto3;
271
+ static readonly typeName = "uniswap.unirpc.v2.GasOverrides";
272
+ static readonly fields: FieldList;
273
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GasOverrides;
274
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GasOverrides;
275
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GasOverrides;
276
+ static equals(a: GasOverrides | PlainMessage<GasOverrides> | undefined, b: GasOverrides | PlainMessage<GasOverrides> | undefined): boolean;
277
+ }
278
+ /**
279
+ * Urgency is the high-level interface for selecting a fee tier. Each tier
280
+ * tells the server "use your tuned defaults for this chain at this tier"
281
+ * and may carry optional caller-supplied per-field overrides that the
282
+ * server returns verbatim.
283
+ *
284
+ * When `urgencies` is non-empty on EstimateGasFeeRequest, the server uses
285
+ * the refactored fee calculation path; otherwise the legacy `gas_strategies`
286
+ * path is used (mutually exclusive — see EstimateGasFeeRequest).
287
+ *
288
+ * @generated from message uniswap.unirpc.v2.Urgency
289
+ */
290
+ export declare class Urgency extends Message<Urgency> {
291
+ /**
292
+ * @generated from field: uniswap.unirpc.v2.Level level = 1;
293
+ */
294
+ level: Level;
295
+ /**
296
+ * @generated from field: optional uniswap.unirpc.v2.GasOverrides overrides = 2;
297
+ */
298
+ overrides?: GasOverrides;
299
+ constructor(data?: PartialMessage<Urgency>);
300
+ static readonly runtime: typeof proto3;
301
+ static readonly typeName = "uniswap.unirpc.v2.Urgency";
302
+ static readonly fields: FieldList;
303
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Urgency;
304
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Urgency;
305
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Urgency;
306
+ static equals(a: Urgency | PlainMessage<Urgency> | undefined, b: Urgency | PlainMessage<Urgency> | undefined): boolean;
307
+ }
208
308
  /**
209
309
  * @generated from message uniswap.unirpc.v2.GasFeesBySpeed
210
310
  */
@@ -368,7 +468,11 @@ export declare class EstimateGasFeeRequest extends Message<EstimateGasFeeRequest
368
468
  */
369
469
  gasLimit?: string;
370
470
  /**
371
- * @generated from field: repeated uniswap.unirpc.v2.GasStrategy gas_strategies = 7;
471
+ * DEPRECATED: legacy path. Prefer `urgencies`. Mutually exclusive with
472
+ * `urgencies`. Still honored on the wire for backward compatibility.
473
+ *
474
+ * @generated from field: repeated uniswap.unirpc.v2.GasStrategy gas_strategies = 7 [deprecated = true];
475
+ * @deprecated
372
476
  */
373
477
  gasStrategies: GasStrategy[];
374
478
  /**
@@ -385,6 +489,15 @@ export declare class EstimateGasFeeRequest extends Message<EstimateGasFeeRequest
385
489
  * @generated from field: repeated uniswap.unirpc.v2.Call preflight_calls = 10;
386
490
  */
387
491
  preflightCalls: Call[];
492
+ /**
493
+ * High-level fee tier selection. When non-empty, the server uses the
494
+ * refactored fee calculation path and returns one GasEstimate per entry
495
+ * (in `gas_estimates`). Mutually exclusive with `gas_strategies`: setting
496
+ * both is a client error (400).
497
+ *
498
+ * @generated from field: repeated uniswap.unirpc.v2.Urgency urgencies = 11;
499
+ */
500
+ urgencies: Urgency[];
388
501
  constructor(data?: PartialMessage<EstimateGasFeeRequest>);
389
502
  static readonly runtime: typeof proto3;
390
503
  static readonly typeName = "uniswap.unirpc.v2.EstimateGasFeeRequest";
@@ -3,6 +3,41 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { Message, proto3, StringValue, Value } from "@bufbuild/protobuf";
6
+ /**
7
+ * Level selects the server's tuned defaults for this chain at the chosen
8
+ * tier (NORMAL / FAST / URGENT). Required when an Urgency is present.
9
+ *
10
+ * LEVEL_UNSPECIFIED exists only to satisfy proto3's "enum must have a 0
11
+ * value" rule; sending it is a client error (400).
12
+ *
13
+ * @generated from enum uniswap.unirpc.v2.Level
14
+ */
15
+ export var Level;
16
+ (function (Level) {
17
+ /**
18
+ * @generated from enum value: LEVEL_UNSPECIFIED = 0;
19
+ */
20
+ Level[Level["LEVEL_UNSPECIFIED"] = 0] = "LEVEL_UNSPECIFIED";
21
+ /**
22
+ * @generated from enum value: NORMAL = 1;
23
+ */
24
+ Level[Level["NORMAL"] = 1] = "NORMAL";
25
+ /**
26
+ * @generated from enum value: FAST = 2;
27
+ */
28
+ Level[Level["FAST"] = 2] = "FAST";
29
+ /**
30
+ * @generated from enum value: URGENT = 3;
31
+ */
32
+ Level[Level["URGENT"] = 3] = "URGENT";
33
+ })(Level || (Level = {}));
34
+ // Retrieve enum metadata with: proto3.getEnumType(Level)
35
+ proto3.util.setEnumType(Level, "uniswap.unirpc.v2.Level", [
36
+ { no: 0, name: "LEVEL_UNSPECIFIED" },
37
+ { no: 1, name: "NORMAL" },
38
+ { no: 2, name: "FAST" },
39
+ { no: 3, name: "URGENT" },
40
+ ]);
6
41
  /**
7
42
  * @generated from enum uniswap.unirpc.v2.Chain
8
43
  */
@@ -159,6 +194,10 @@ export var Chain;
159
194
  * @generated from enum value: CHAIN_LINEA = 59144;
160
195
  */
161
196
  Chain[Chain["LINEA"] = 59144] = "LINEA";
197
+ /**
198
+ * @generated from enum value: CHAIN_ARC = 5042;
199
+ */
200
+ Chain[Chain["ARC"] = 5042] = "ARC";
162
201
  })(Chain || (Chain = {}));
163
202
  // Retrieve enum metadata with: proto3.getEnumType(Chain)
164
203
  proto3.util.setEnumType(Chain, "uniswap.unirpc.v2.Chain", [
@@ -199,6 +238,7 @@ proto3.util.setEnumType(Chain, "uniswap.unirpc.v2.Chain", [
199
238
  { no: 4326, name: "CHAIN_MEGAETH" },
200
239
  { no: 4217, name: "CHAIN_TEMPO" },
201
240
  { no: 59144, name: "CHAIN_LINEA" },
241
+ { no: 5042, name: "CHAIN_ARC" },
202
242
  ]);
203
243
  /**
204
244
  * @generated from message uniswap.unirpc.v2.GasStrategy
@@ -234,6 +274,81 @@ GasStrategy.fields = proto3.util.newFieldList(() => [
234
274
  { no: 8, name: "min_priority_fee_gwei", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
235
275
  { no: 9, name: "max_priority_fee_gwei", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
236
276
  ]);
277
+ /**
278
+ * GasOverrides are caller-supplied per-field substitutions for the
279
+ * server's computed quote. Values are decimal-string wei (not Gwei) for
280
+ * full precision. When supplied, each field is returned verbatim — the
281
+ * server does NOT silently lower or raise. A non-overridden field falls
282
+ * back to the market quote (priority) or to baseFee + priority (maxFee).
283
+ * The server enforces the EVM invariant maxFee >= priority and returns
284
+ * InvalidGasOverrides (400 BadRequest) on violation.
285
+ *
286
+ * @generated from message uniswap.unirpc.v2.GasOverrides
287
+ */
288
+ export class GasOverrides extends Message {
289
+ constructor(data) {
290
+ super();
291
+ proto3.util.initPartial(data, this);
292
+ }
293
+ static fromBinary(bytes, options) {
294
+ return new GasOverrides().fromBinary(bytes, options);
295
+ }
296
+ static fromJson(jsonValue, options) {
297
+ return new GasOverrides().fromJson(jsonValue, options);
298
+ }
299
+ static fromJsonString(jsonString, options) {
300
+ return new GasOverrides().fromJsonString(jsonString, options);
301
+ }
302
+ static equals(a, b) {
303
+ return proto3.util.equals(GasOverrides, a, b);
304
+ }
305
+ }
306
+ GasOverrides.runtime = proto3;
307
+ GasOverrides.typeName = "uniswap.unirpc.v2.GasOverrides";
308
+ GasOverrides.fields = proto3.util.newFieldList(() => [
309
+ { no: 1, name: "max_priority_fee_per_gas", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
310
+ { no: 2, name: "max_fee_per_gas", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
311
+ ]);
312
+ /**
313
+ * Urgency is the high-level interface for selecting a fee tier. Each tier
314
+ * tells the server "use your tuned defaults for this chain at this tier"
315
+ * and may carry optional caller-supplied per-field overrides that the
316
+ * server returns verbatim.
317
+ *
318
+ * When `urgencies` is non-empty on EstimateGasFeeRequest, the server uses
319
+ * the refactored fee calculation path; otherwise the legacy `gas_strategies`
320
+ * path is used (mutually exclusive — see EstimateGasFeeRequest).
321
+ *
322
+ * @generated from message uniswap.unirpc.v2.Urgency
323
+ */
324
+ export class Urgency extends Message {
325
+ constructor(data) {
326
+ super();
327
+ /**
328
+ * @generated from field: uniswap.unirpc.v2.Level level = 1;
329
+ */
330
+ this.level = Level.LEVEL_UNSPECIFIED;
331
+ proto3.util.initPartial(data, this);
332
+ }
333
+ static fromBinary(bytes, options) {
334
+ return new Urgency().fromBinary(bytes, options);
335
+ }
336
+ static fromJson(jsonValue, options) {
337
+ return new Urgency().fromJson(jsonValue, options);
338
+ }
339
+ static fromJsonString(jsonString, options) {
340
+ return new Urgency().fromJsonString(jsonString, options);
341
+ }
342
+ static equals(a, b) {
343
+ return proto3.util.equals(Urgency, a, b);
344
+ }
345
+ }
346
+ Urgency.runtime = proto3;
347
+ Urgency.typeName = "uniswap.unirpc.v2.Urgency";
348
+ Urgency.fields = proto3.util.newFieldList(() => [
349
+ { no: 1, name: "level", kind: "enum", T: proto3.getEnumType(Level) },
350
+ { no: 2, name: "overrides", kind: "message", T: GasOverrides, opt: true },
351
+ ]);
237
352
  /**
238
353
  * @generated from message uniswap.unirpc.v2.GasFeesBySpeed
239
354
  */
@@ -370,7 +485,11 @@ export class EstimateGasFeeRequest extends Message {
370
485
  constructor(data) {
371
486
  super();
372
487
  /**
373
- * @generated from field: repeated uniswap.unirpc.v2.GasStrategy gas_strategies = 7;
488
+ * DEPRECATED: legacy path. Prefer `urgencies`. Mutually exclusive with
489
+ * `urgencies`. Still honored on the wire for backward compatibility.
490
+ *
491
+ * @generated from field: repeated uniswap.unirpc.v2.GasStrategy gas_strategies = 7 [deprecated = true];
492
+ * @deprecated
374
493
  */
375
494
  this.gasStrategies = [];
376
495
  /**
@@ -381,6 +500,15 @@ export class EstimateGasFeeRequest extends Message {
381
500
  * @generated from field: repeated uniswap.unirpc.v2.Call preflight_calls = 10;
382
501
  */
383
502
  this.preflightCalls = [];
503
+ /**
504
+ * High-level fee tier selection. When non-empty, the server uses the
505
+ * refactored fee calculation path and returns one GasEstimate per entry
506
+ * (in `gas_estimates`). Mutually exclusive with `gas_strategies`: setting
507
+ * both is a client error (400).
508
+ *
509
+ * @generated from field: repeated uniswap.unirpc.v2.Urgency urgencies = 11;
510
+ */
511
+ this.urgencies = [];
384
512
  proto3.util.initPartial(data, this);
385
513
  }
386
514
  static fromBinary(bytes, options) {
@@ -409,6 +537,7 @@ EstimateGasFeeRequest.fields = proto3.util.newFieldList(() => [
409
537
  { no: 8, name: "smart_contract_delegation_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
410
538
  { no: 9, name: "state_overrides", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: StateOverrideItem } },
411
539
  { no: 10, name: "preflight_calls", kind: "message", T: Call, repeated: true },
540
+ { no: 11, name: "urgencies", kind: "message", T: Urgency, repeated: true },
412
541
  ]);
413
542
  /**
414
543
  * @generated from message uniswap.unirpc.v2.EstimateGasFeeResponse
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-unirpc-v2",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },