@uniswap/client-unirpc-v2 0.0.3 → 0.0.4
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
|
*/
|
|
@@ -205,6 +232,74 @@ export declare class GasStrategy extends Message<GasStrategy> {
|
|
|
205
232
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GasStrategy;
|
|
206
233
|
static equals(a: GasStrategy | PlainMessage<GasStrategy> | undefined, b: GasStrategy | PlainMessage<GasStrategy> | undefined): boolean;
|
|
207
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* GasOverrides are caller-supplied caps applied on top of the server's
|
|
237
|
+
* computed quote. Values are decimal-string wei (not Gwei) for full
|
|
238
|
+
* precision. Each cap can only LOWER the quote, never raise it.
|
|
239
|
+
*
|
|
240
|
+
* @generated from message uniswap.unirpc.v2.GasOverrides
|
|
241
|
+
*/
|
|
242
|
+
export declare class GasOverrides extends Message<GasOverrides> {
|
|
243
|
+
/**
|
|
244
|
+
* Maximum priority fee (tip) the caller is willing to pay, in wei. If
|
|
245
|
+
* the server's computed priority fee exceeds this, it is capped to this
|
|
246
|
+
* value before being returned.
|
|
247
|
+
*
|
|
248
|
+
* wei
|
|
249
|
+
*
|
|
250
|
+
* @generated from field: optional string max_priority_fee_per_gas = 1;
|
|
251
|
+
*/
|
|
252
|
+
maxPriorityFeePerGas?: string;
|
|
253
|
+
/**
|
|
254
|
+
* Maximum total per-gas fee (= baseFee + priorityFee) the caller is
|
|
255
|
+
* willing to pay, in wei. The server reduces priorityFee so that
|
|
256
|
+
* baseFee + priorityFee does not exceed this cap (priorityFee is
|
|
257
|
+
* floored at zero; if baseFee already exceeds this cap, the resulting
|
|
258
|
+
* tx will not be includable on-chain, which is the caller's choice).
|
|
259
|
+
*
|
|
260
|
+
* wei
|
|
261
|
+
*
|
|
262
|
+
* @generated from field: optional string max_fee_per_gas = 2;
|
|
263
|
+
*/
|
|
264
|
+
maxFeePerGas?: string;
|
|
265
|
+
constructor(data?: PartialMessage<GasOverrides>);
|
|
266
|
+
static readonly runtime: typeof proto3;
|
|
267
|
+
static readonly typeName = "uniswap.unirpc.v2.GasOverrides";
|
|
268
|
+
static readonly fields: FieldList;
|
|
269
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GasOverrides;
|
|
270
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GasOverrides;
|
|
271
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GasOverrides;
|
|
272
|
+
static equals(a: GasOverrides | PlainMessage<GasOverrides> | undefined, b: GasOverrides | PlainMessage<GasOverrides> | undefined): boolean;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Urgency is the high-level interface for selecting a fee tier. Each tier
|
|
276
|
+
* tells the server "use your tuned defaults for this chain at this tier"
|
|
277
|
+
* and may carry optional caller-supplied caps that the server honors.
|
|
278
|
+
*
|
|
279
|
+
* When `urgencies` is non-empty on EstimateGasFeeRequest, the server uses
|
|
280
|
+
* the refactored fee calculation path; otherwise the legacy `gas_strategies`
|
|
281
|
+
* path is used (mutually exclusive — see EstimateGasFeeRequest).
|
|
282
|
+
*
|
|
283
|
+
* @generated from message uniswap.unirpc.v2.Urgency
|
|
284
|
+
*/
|
|
285
|
+
export declare class Urgency extends Message<Urgency> {
|
|
286
|
+
/**
|
|
287
|
+
* @generated from field: uniswap.unirpc.v2.Level level = 1;
|
|
288
|
+
*/
|
|
289
|
+
level: Level;
|
|
290
|
+
/**
|
|
291
|
+
* @generated from field: optional uniswap.unirpc.v2.GasOverrides overrides = 2;
|
|
292
|
+
*/
|
|
293
|
+
overrides?: GasOverrides;
|
|
294
|
+
constructor(data?: PartialMessage<Urgency>);
|
|
295
|
+
static readonly runtime: typeof proto3;
|
|
296
|
+
static readonly typeName = "uniswap.unirpc.v2.Urgency";
|
|
297
|
+
static readonly fields: FieldList;
|
|
298
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Urgency;
|
|
299
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Urgency;
|
|
300
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Urgency;
|
|
301
|
+
static equals(a: Urgency | PlainMessage<Urgency> | undefined, b: Urgency | PlainMessage<Urgency> | undefined): boolean;
|
|
302
|
+
}
|
|
208
303
|
/**
|
|
209
304
|
* @generated from message uniswap.unirpc.v2.GasFeesBySpeed
|
|
210
305
|
*/
|
|
@@ -368,7 +463,11 @@ export declare class EstimateGasFeeRequest extends Message<EstimateGasFeeRequest
|
|
|
368
463
|
*/
|
|
369
464
|
gasLimit?: string;
|
|
370
465
|
/**
|
|
371
|
-
*
|
|
466
|
+
* DEPRECATED: legacy path. Prefer `urgencies`. Mutually exclusive with
|
|
467
|
+
* `urgencies`. Still honored on the wire for backward compatibility.
|
|
468
|
+
*
|
|
469
|
+
* @generated from field: repeated uniswap.unirpc.v2.GasStrategy gas_strategies = 7 [deprecated = true];
|
|
470
|
+
* @deprecated
|
|
372
471
|
*/
|
|
373
472
|
gasStrategies: GasStrategy[];
|
|
374
473
|
/**
|
|
@@ -385,6 +484,15 @@ export declare class EstimateGasFeeRequest extends Message<EstimateGasFeeRequest
|
|
|
385
484
|
* @generated from field: repeated uniswap.unirpc.v2.Call preflight_calls = 10;
|
|
386
485
|
*/
|
|
387
486
|
preflightCalls: Call[];
|
|
487
|
+
/**
|
|
488
|
+
* High-level fee tier selection. When non-empty, the server uses the
|
|
489
|
+
* refactored fee calculation path and returns one GasEstimate per entry
|
|
490
|
+
* (in `gas_estimates`). Mutually exclusive with `gas_strategies`: setting
|
|
491
|
+
* both is a client error (400).
|
|
492
|
+
*
|
|
493
|
+
* @generated from field: repeated uniswap.unirpc.v2.Urgency urgencies = 11;
|
|
494
|
+
*/
|
|
495
|
+
urgencies: Urgency[];
|
|
388
496
|
constructor(data?: PartialMessage<EstimateGasFeeRequest>);
|
|
389
497
|
static readonly runtime: typeof proto3;
|
|
390
498
|
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
|
*/
|
|
@@ -234,6 +269,76 @@ GasStrategy.fields = proto3.util.newFieldList(() => [
|
|
|
234
269
|
{ no: 8, name: "min_priority_fee_gwei", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
235
270
|
{ no: 9, name: "max_priority_fee_gwei", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, opt: true },
|
|
236
271
|
]);
|
|
272
|
+
/**
|
|
273
|
+
* GasOverrides are caller-supplied caps applied on top of the server's
|
|
274
|
+
* computed quote. Values are decimal-string wei (not Gwei) for full
|
|
275
|
+
* precision. Each cap can only LOWER the quote, never raise it.
|
|
276
|
+
*
|
|
277
|
+
* @generated from message uniswap.unirpc.v2.GasOverrides
|
|
278
|
+
*/
|
|
279
|
+
export class GasOverrides extends Message {
|
|
280
|
+
constructor(data) {
|
|
281
|
+
super();
|
|
282
|
+
proto3.util.initPartial(data, this);
|
|
283
|
+
}
|
|
284
|
+
static fromBinary(bytes, options) {
|
|
285
|
+
return new GasOverrides().fromBinary(bytes, options);
|
|
286
|
+
}
|
|
287
|
+
static fromJson(jsonValue, options) {
|
|
288
|
+
return new GasOverrides().fromJson(jsonValue, options);
|
|
289
|
+
}
|
|
290
|
+
static fromJsonString(jsonString, options) {
|
|
291
|
+
return new GasOverrides().fromJsonString(jsonString, options);
|
|
292
|
+
}
|
|
293
|
+
static equals(a, b) {
|
|
294
|
+
return proto3.util.equals(GasOverrides, a, b);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
GasOverrides.runtime = proto3;
|
|
298
|
+
GasOverrides.typeName = "uniswap.unirpc.v2.GasOverrides";
|
|
299
|
+
GasOverrides.fields = proto3.util.newFieldList(() => [
|
|
300
|
+
{ no: 1, name: "max_priority_fee_per_gas", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
301
|
+
{ no: 2, name: "max_fee_per_gas", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
302
|
+
]);
|
|
303
|
+
/**
|
|
304
|
+
* Urgency is the high-level interface for selecting a fee tier. Each tier
|
|
305
|
+
* tells the server "use your tuned defaults for this chain at this tier"
|
|
306
|
+
* and may carry optional caller-supplied caps that the server honors.
|
|
307
|
+
*
|
|
308
|
+
* When `urgencies` is non-empty on EstimateGasFeeRequest, the server uses
|
|
309
|
+
* the refactored fee calculation path; otherwise the legacy `gas_strategies`
|
|
310
|
+
* path is used (mutually exclusive — see EstimateGasFeeRequest).
|
|
311
|
+
*
|
|
312
|
+
* @generated from message uniswap.unirpc.v2.Urgency
|
|
313
|
+
*/
|
|
314
|
+
export class Urgency extends Message {
|
|
315
|
+
constructor(data) {
|
|
316
|
+
super();
|
|
317
|
+
/**
|
|
318
|
+
* @generated from field: uniswap.unirpc.v2.Level level = 1;
|
|
319
|
+
*/
|
|
320
|
+
this.level = Level.LEVEL_UNSPECIFIED;
|
|
321
|
+
proto3.util.initPartial(data, this);
|
|
322
|
+
}
|
|
323
|
+
static fromBinary(bytes, options) {
|
|
324
|
+
return new Urgency().fromBinary(bytes, options);
|
|
325
|
+
}
|
|
326
|
+
static fromJson(jsonValue, options) {
|
|
327
|
+
return new Urgency().fromJson(jsonValue, options);
|
|
328
|
+
}
|
|
329
|
+
static fromJsonString(jsonString, options) {
|
|
330
|
+
return new Urgency().fromJsonString(jsonString, options);
|
|
331
|
+
}
|
|
332
|
+
static equals(a, b) {
|
|
333
|
+
return proto3.util.equals(Urgency, a, b);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
Urgency.runtime = proto3;
|
|
337
|
+
Urgency.typeName = "uniswap.unirpc.v2.Urgency";
|
|
338
|
+
Urgency.fields = proto3.util.newFieldList(() => [
|
|
339
|
+
{ no: 1, name: "level", kind: "enum", T: proto3.getEnumType(Level) },
|
|
340
|
+
{ no: 2, name: "overrides", kind: "message", T: GasOverrides, opt: true },
|
|
341
|
+
]);
|
|
237
342
|
/**
|
|
238
343
|
* @generated from message uniswap.unirpc.v2.GasFeesBySpeed
|
|
239
344
|
*/
|
|
@@ -370,7 +475,11 @@ export class EstimateGasFeeRequest extends Message {
|
|
|
370
475
|
constructor(data) {
|
|
371
476
|
super();
|
|
372
477
|
/**
|
|
373
|
-
*
|
|
478
|
+
* DEPRECATED: legacy path. Prefer `urgencies`. Mutually exclusive with
|
|
479
|
+
* `urgencies`. Still honored on the wire for backward compatibility.
|
|
480
|
+
*
|
|
481
|
+
* @generated from field: repeated uniswap.unirpc.v2.GasStrategy gas_strategies = 7 [deprecated = true];
|
|
482
|
+
* @deprecated
|
|
374
483
|
*/
|
|
375
484
|
this.gasStrategies = [];
|
|
376
485
|
/**
|
|
@@ -381,6 +490,15 @@ export class EstimateGasFeeRequest extends Message {
|
|
|
381
490
|
* @generated from field: repeated uniswap.unirpc.v2.Call preflight_calls = 10;
|
|
382
491
|
*/
|
|
383
492
|
this.preflightCalls = [];
|
|
493
|
+
/**
|
|
494
|
+
* High-level fee tier selection. When non-empty, the server uses the
|
|
495
|
+
* refactored fee calculation path and returns one GasEstimate per entry
|
|
496
|
+
* (in `gas_estimates`). Mutually exclusive with `gas_strategies`: setting
|
|
497
|
+
* both is a client error (400).
|
|
498
|
+
*
|
|
499
|
+
* @generated from field: repeated uniswap.unirpc.v2.Urgency urgencies = 11;
|
|
500
|
+
*/
|
|
501
|
+
this.urgencies = [];
|
|
384
502
|
proto3.util.initPartial(data, this);
|
|
385
503
|
}
|
|
386
504
|
static fromBinary(bytes, options) {
|
|
@@ -409,6 +527,7 @@ EstimateGasFeeRequest.fields = proto3.util.newFieldList(() => [
|
|
|
409
527
|
{ no: 8, name: "smart_contract_delegation_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
410
528
|
{ no: 9, name: "state_overrides", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: StateOverrideItem } },
|
|
411
529
|
{ no: 10, name: "preflight_calls", kind: "message", T: Call, repeated: true },
|
|
530
|
+
{ no: 11, name: "urgencies", kind: "message", T: Urgency, repeated: true },
|
|
412
531
|
]);
|
|
413
532
|
/**
|
|
414
533
|
* @generated from message uniswap.unirpc.v2.EstimateGasFeeResponse
|