@uniswap/client-trading 0.2.2 → 0.4.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.
@@ -1,5 +1,5 @@
1
1
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
2
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
2
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, 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
  */
@@ -56,6 +56,20 @@ export declare const checkApproval: {
56
56
  readonly typeName: "trading.v1.tradingService";
57
57
  };
58
58
  };
59
+ /**
60
+ * @generated from rpc trading.v1.tradingService.Permissions
61
+ */
62
+ export declare const permissions: {
63
+ readonly localName: "permissions";
64
+ readonly name: "Permissions";
65
+ readonly kind: MethodKind.Unary;
66
+ readonly I: typeof PermissionsRequest;
67
+ readonly O: typeof PermissionsResponse;
68
+ readonly idempotency: MethodIdempotency.NoSideEffects;
69
+ readonly service: {
70
+ readonly typeName: "trading.v1.tradingService";
71
+ };
72
+ };
59
73
  /**
60
74
  * @generated from rpc trading.v1.tradingService.GetSwaps
61
75
  */
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  // @ts-nocheck
5
5
  import { MethodIdempotency, MethodKind } from "@bufbuild/protobuf";
6
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
6
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, 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
  */
@@ -60,6 +60,20 @@ export const checkApproval = {
60
60
  typeName: "trading.v1.tradingService"
61
61
  }
62
62
  };
63
+ /**
64
+ * @generated from rpc trading.v1.tradingService.Permissions
65
+ */
66
+ export const permissions = {
67
+ localName: "permissions",
68
+ name: "Permissions",
69
+ kind: MethodKind.Unary,
70
+ I: PermissionsRequest,
71
+ O: PermissionsResponse,
72
+ idempotency: MethodIdempotency.NoSideEffects,
73
+ service: {
74
+ typeName: "trading.v1.tradingService"
75
+ }
76
+ };
63
77
  /**
64
78
  * @generated from rpc trading.v1.tradingService.GetSwaps
65
79
  */
@@ -1,4 +1,4 @@
1
- import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
1
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, 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
@@ -46,6 +46,16 @@ export declare const tradingService: {
46
46
  readonly kind: MethodKind.Unary;
47
47
  readonly idempotency: MethodIdempotency.NoSideEffects;
48
48
  };
49
+ /**
50
+ * @generated from rpc trading.v1.tradingService.Permissions
51
+ */
52
+ readonly permissions: {
53
+ readonly name: "Permissions";
54
+ readonly I: typeof PermissionsRequest;
55
+ readonly O: typeof PermissionsResponse;
56
+ readonly kind: MethodKind.Unary;
57
+ readonly idempotency: MethodIdempotency.NoSideEffects;
58
+ };
49
59
  /**
50
60
  * @generated from rpc trading.v1.tradingService.GetSwaps
51
61
  */
@@ -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 { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PlanResponse, QuoteRequest, QuoteResponse, Swap4337Request, Swap4337Response, Swap5792Request, Swap5792Response, Swap7702Request, Swap7702Response, SwappableTokensRequest, SwappableTokensResponse, SwapRequest, SwapResponse, UpdatePlanRequest } from "./api_pb.js";
5
+ import { CheckApprovalRequest, CheckApprovalResponse, CheckWalletDelegationRequest, CheckWalletDelegationResponse, CreatePlanRequest, DocsRequest, DocsResponse, Encode4337Request, Encode4337Response, Encode7702Request, Encode7702Response, GetOrdersRequest, GetOrdersResponse, GetPlanRequest, GetPlansRequest, GetPlansResponse, GetSwapsRequest, GetSwapsResponse, OrderRequest, OrderResponse, PermissionsRequest, PermissionsResponse, PlanResponse, QuoteRequest, QuoteResponse, 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
@@ -50,6 +50,16 @@ export const tradingService = {
50
50
  kind: MethodKind.Unary,
51
51
  idempotency: MethodIdempotency.NoSideEffects,
52
52
  },
53
+ /**
54
+ * @generated from rpc trading.v1.tradingService.Permissions
55
+ */
56
+ permissions: {
57
+ name: "Permissions",
58
+ I: PermissionsRequest,
59
+ O: PermissionsResponse,
60
+ kind: MethodKind.Unary,
61
+ idempotency: MethodIdempotency.NoSideEffects,
62
+ },
53
63
  /**
54
64
  * @generated from rpc trading.v1.tradingService.GetSwaps
55
65
  */
@@ -130,6 +130,10 @@ export declare enum ChainId {
130
130
  * @generated from enum value: LINEA = 59144;
131
131
  */
132
132
  LINEA = 59144,
133
+ /**
134
+ * @generated from enum value: MEGAETH = 4326;
135
+ */
136
+ MEGAETH = 4326,
133
137
  /**
134
138
  * @generated from enum value: TEMPO = 4217;
135
139
  */
@@ -158,7 +162,11 @@ export declare enum Protocols {
158
162
  /**
159
163
  * @generated from enum value: UNISWAPX_V3 = 5;
160
164
  */
161
- UNISWAPX_V3 = 5
165
+ UNISWAPX_V3 = 5,
166
+ /**
167
+ * @generated from enum value: UNISWAPX_LATEST = 6;
168
+ */
169
+ UNISWAPX_LATEST = 6
162
170
  }
163
171
  /**
164
172
  * @generated from enum trading.v1.RoutingPreference
@@ -889,6 +897,10 @@ export declare class Swap5792Request extends Message<Swap5792Request> {
889
897
  * @generated from field: optional trading.v1.Urgency urgency = 6;
890
898
  */
891
899
  urgency?: Urgency;
900
+ /**
901
+ * @generated from field: optional trading.v1.UrgencyWithOverrides urgency_overrides = 7;
902
+ */
903
+ urgencyOverrides?: UrgencyWithOverrides;
892
904
  constructor(data?: PartialMessage<Swap5792Request>);
893
905
  static readonly runtime: typeof proto3;
894
906
  static readonly typeName = "trading.v1.Swap5792Request";
@@ -1353,6 +1365,72 @@ export declare class Token extends Message<Token> {
1353
1365
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Token;
1354
1366
  static equals(a: Token | PlainMessage<Token> | undefined, b: Token | PlainMessage<Token> | undefined): boolean;
1355
1367
  }
1368
+ /**
1369
+ * Caller-supplied caps applied on top of the gas service's computed quote.
1370
+ * All fields are absolute wei (decimal string). The gas service applies
1371
+ * max_priority_fee_per_gas / max_fee_per_gas as caps only — they lower the
1372
+ * quote, never raise it. gas_limit, if set, replaces the limit calculation
1373
+ * entirely.
1374
+ *
1375
+ * TAPI deliberately bundles gas_limit into UrgencyOverrides for a
1376
+ * REST-friendly client API. Trading's translation layer extracts gas_limit
1377
+ * out to the top-level gas_limit field on the unirpc-v2 request before
1378
+ * forwarding; unirpc-v2's `GasOverrides` proto carries only the fee-market
1379
+ * fields.
1380
+ *
1381
+ * @generated from message trading.v1.UrgencyOverrides
1382
+ */
1383
+ export declare class UrgencyOverrides extends Message<UrgencyOverrides> {
1384
+ /**
1385
+ * wei
1386
+ *
1387
+ * @generated from field: optional string max_priority_fee_per_gas = 1;
1388
+ */
1389
+ maxPriorityFeePerGas?: string;
1390
+ /**
1391
+ * wei
1392
+ *
1393
+ * @generated from field: optional string max_fee_per_gas = 2;
1394
+ */
1395
+ maxFeePerGas?: string;
1396
+ /**
1397
+ * @generated from field: optional string gas_limit = 3;
1398
+ */
1399
+ gasLimit?: string;
1400
+ constructor(data?: PartialMessage<UrgencyOverrides>);
1401
+ static readonly runtime: typeof proto3;
1402
+ static readonly typeName = "trading.v1.UrgencyOverrides";
1403
+ static readonly fields: FieldList;
1404
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UrgencyOverrides;
1405
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UrgencyOverrides;
1406
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UrgencyOverrides;
1407
+ static equals(a: UrgencyOverrides | PlainMessage<UrgencyOverrides> | undefined, b: UrgencyOverrides | PlainMessage<UrgencyOverrides> | undefined): boolean;
1408
+ }
1409
+ /**
1410
+ * High-level fee tier selection with optional caps. Mutually exclusive
1411
+ * with the legacy `urgency` enum field and `gas_strategies` on each
1412
+ * request — only one form of gas selection should be set.
1413
+ *
1414
+ * @generated from message trading.v1.UrgencyWithOverrides
1415
+ */
1416
+ export declare class UrgencyWithOverrides extends Message<UrgencyWithOverrides> {
1417
+ /**
1418
+ * @generated from field: trading.v1.Urgency level = 1;
1419
+ */
1420
+ level: Urgency;
1421
+ /**
1422
+ * @generated from field: optional trading.v1.UrgencyOverrides overrides = 2;
1423
+ */
1424
+ overrides?: UrgencyOverrides;
1425
+ constructor(data?: PartialMessage<UrgencyWithOverrides>);
1426
+ static readonly runtime: typeof proto3;
1427
+ static readonly typeName = "trading.v1.UrgencyWithOverrides";
1428
+ static readonly fields: FieldList;
1429
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UrgencyWithOverrides;
1430
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UrgencyWithOverrides;
1431
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UrgencyWithOverrides;
1432
+ static equals(a: UrgencyWithOverrides | PlainMessage<UrgencyWithOverrides> | undefined, b: UrgencyWithOverrides | PlainMessage<UrgencyWithOverrides> | undefined): boolean;
1433
+ }
1356
1434
  /**
1357
1435
  * @generated from message trading.v1.GasStrategy
1358
1436
  */
@@ -1463,7 +1541,8 @@ export declare class QuoteRequest extends Message<QuoteRequest> {
1463
1541
  */
1464
1542
  urgency?: Urgency;
1465
1543
  /**
1466
- * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 14;
1544
+ * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 14 [deprecated = true];
1545
+ * @deprecated
1467
1546
  */
1468
1547
  gasStrategies: GasStrategy[];
1469
1548
  /**
@@ -1490,6 +1569,10 @@ export declare class QuoteRequest extends Message<QuoteRequest> {
1490
1569
  * @generated from field: optional string recipient = 22;
1491
1570
  */
1492
1571
  recipient?: string;
1572
+ /**
1573
+ * @generated from field: optional trading.v1.UrgencyWithOverrides urgency_overrides = 23;
1574
+ */
1575
+ urgencyOverrides?: UrgencyWithOverrides;
1493
1576
  constructor(data?: PartialMessage<QuoteRequest>);
1494
1577
  static readonly runtime: typeof proto3;
1495
1578
  static readonly typeName = "trading.v1.QuoteRequest";
@@ -3180,13 +3263,18 @@ export declare class SwapRequest extends Message<SwapRequest> {
3180
3263
  */
3181
3264
  urgency?: Urgency;
3182
3265
  /**
3183
- * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 12;
3266
+ * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 12 [deprecated = true];
3267
+ * @deprecated
3184
3268
  */
3185
3269
  gasStrategies: GasStrategy[];
3186
3270
  /**
3187
3271
  * @generated from field: optional bool include_gas_info = 13;
3188
3272
  */
3189
3273
  includeGasInfo?: boolean;
3274
+ /**
3275
+ * @generated from field: optional trading.v1.UrgencyWithOverrides urgency_overrides = 14;
3276
+ */
3277
+ urgencyOverrides?: UrgencyWithOverrides;
3190
3278
  constructor(data?: PartialMessage<SwapRequest>);
3191
3279
  static readonly runtime: typeof proto3;
3192
3280
  static readonly typeName = "trading.v1.SwapRequest";
@@ -3291,9 +3379,14 @@ export declare class Swap7702Request extends Message<Swap7702Request> {
3291
3379
  */
3292
3380
  urgency?: Urgency;
3293
3381
  /**
3294
- * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 10;
3382
+ * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 10 [deprecated = true];
3383
+ * @deprecated
3295
3384
  */
3296
3385
  gasStrategies: GasStrategy[];
3386
+ /**
3387
+ * @generated from field: optional trading.v1.UrgencyWithOverrides urgency_overrides = 11;
3388
+ */
3389
+ urgencyOverrides?: UrgencyWithOverrides;
3297
3390
  constructor(data?: PartialMessage<Swap7702Request>);
3298
3391
  static readonly runtime: typeof proto3;
3299
3392
  static readonly typeName = "trading.v1.Swap7702Request";
@@ -3473,10 +3566,6 @@ export declare class Customer extends Message<Customer> {
3473
3566
  * @generated from field: string name = 2;
3474
3567
  */
3475
3568
  name: string;
3476
- /**
3477
- * @generated from field: bool isInternal = 3;
3478
- */
3479
- isInternal: boolean;
3480
3569
  /**
3481
3570
  * @generated from field: string createdAt = 4;
3482
3571
  */
@@ -3518,10 +3607,6 @@ export declare class CreateCustomerRequest extends Message<CreateCustomerRequest
3518
3607
  * @generated from field: string name = 1;
3519
3608
  */
3520
3609
  name: string;
3521
- /**
3522
- * @generated from field: bool isInternal = 2;
3523
- */
3524
- isInternal: boolean;
3525
3610
  /**
3526
3611
  * @generated from field: string createdBy = 3;
3527
3612
  */
@@ -3640,10 +3725,6 @@ export declare class UpdateCustomerRequest extends Message<UpdateCustomerRequest
3640
3725
  * @generated from field: string name = 2;
3641
3726
  */
3642
3727
  name: string;
3643
- /**
3644
- * @generated from field: bool isInternal = 3;
3645
- */
3646
- isInternal: boolean;
3647
3728
  constructor(data?: PartialMessage<UpdateCustomerRequest>);
3648
3729
  static readonly runtime: typeof proto3;
3649
3730
  static readonly typeName = "trading.v1.UpdateCustomerRequest";
@@ -4960,6 +5041,10 @@ export declare class CheckApprovalRequest extends Message<CheckApprovalRequest>
4960
5041
  * @generated from field: optional trading.v1.ChainId token_out_chain_id = 8;
4961
5042
  */
4962
5043
  tokenOutChainId?: ChainId;
5044
+ /**
5045
+ * @generated from field: optional trading.v1.UrgencyWithOverrides urgency_overrides = 9;
5046
+ */
5047
+ urgencyOverrides?: UrgencyWithOverrides;
4963
5048
  constructor(data?: PartialMessage<CheckApprovalRequest>);
4964
5049
  static readonly runtime: typeof proto3;
4965
5050
  static readonly typeName = "trading.v1.CheckApprovalRequest";
@@ -5006,6 +5091,85 @@ export declare class CheckApprovalResponse extends Message<CheckApprovalResponse
5006
5091
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): CheckApprovalResponse;
5007
5092
  static equals(a: CheckApprovalResponse | PlainMessage<CheckApprovalResponse> | undefined, b: CheckApprovalResponse | PlainMessage<CheckApprovalResponse> | undefined): boolean;
5008
5093
  }
5094
+ /**
5095
+ * @generated from message trading.v1.PermissionsRequest
5096
+ */
5097
+ export declare class PermissionsRequest extends Message<PermissionsRequest> {
5098
+ /**
5099
+ * @generated from field: string wallet_address = 1;
5100
+ */
5101
+ walletAddress: string;
5102
+ /**
5103
+ * @generated from field: repeated string tokens = 2;
5104
+ */
5105
+ tokens: string[];
5106
+ /**
5107
+ * @generated from field: trading.v1.ChainId chain_id = 3;
5108
+ */
5109
+ chainId: ChainId;
5110
+ constructor(data?: PartialMessage<PermissionsRequest>);
5111
+ static readonly runtime: typeof proto3;
5112
+ static readonly typeName = "trading.v1.PermissionsRequest";
5113
+ static readonly fields: FieldList;
5114
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PermissionsRequest;
5115
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PermissionsRequest;
5116
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PermissionsRequest;
5117
+ static equals(a: PermissionsRequest | PlainMessage<PermissionsRequest> | undefined, b: PermissionsRequest | PlainMessage<PermissionsRequest> | undefined): boolean;
5118
+ }
5119
+ /**
5120
+ * @generated from message trading.v1.PermissionsResponse
5121
+ */
5122
+ export declare class PermissionsResponse extends Message<PermissionsResponse> {
5123
+ /**
5124
+ * @generated from field: string request_id = 1;
5125
+ */
5126
+ requestId: string;
5127
+ /**
5128
+ * @generated from field: repeated trading.v1.PermissionsResult results = 2;
5129
+ */
5130
+ results: PermissionsResult[];
5131
+ constructor(data?: PartialMessage<PermissionsResponse>);
5132
+ static readonly runtime: typeof proto3;
5133
+ static readonly typeName = "trading.v1.PermissionsResponse";
5134
+ static readonly fields: FieldList;
5135
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PermissionsResponse;
5136
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PermissionsResponse;
5137
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PermissionsResponse;
5138
+ static equals(a: PermissionsResponse | PlainMessage<PermissionsResponse> | undefined, b: PermissionsResponse | PlainMessage<PermissionsResponse> | undefined): boolean;
5139
+ }
5140
+ /**
5141
+ * @generated from message trading.v1.PermissionsResult
5142
+ */
5143
+ export declare class PermissionsResult extends Message<PermissionsResult> {
5144
+ /**
5145
+ * @generated from field: string token = 1;
5146
+ */
5147
+ token: string;
5148
+ /**
5149
+ * @generated from field: bool is_permissioned = 2;
5150
+ */
5151
+ isPermissioned: boolean;
5152
+ /**
5153
+ * @generated from field: optional bool is_allowlisted = 3;
5154
+ */
5155
+ isAllowlisted?: boolean;
5156
+ /**
5157
+ * @generated from field: optional string adapter_token_address = 4;
5158
+ */
5159
+ adapterTokenAddress?: string;
5160
+ /**
5161
+ * @generated from field: optional string kyc_url = 5;
5162
+ */
5163
+ kycUrl?: string;
5164
+ constructor(data?: PartialMessage<PermissionsResult>);
5165
+ static readonly runtime: typeof proto3;
5166
+ static readonly typeName = "trading.v1.PermissionsResult";
5167
+ static readonly fields: FieldList;
5168
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PermissionsResult;
5169
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PermissionsResult;
5170
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PermissionsResult;
5171
+ static equals(a: PermissionsResult | PlainMessage<PermissionsResult> | undefined, b: PermissionsResult | PlainMessage<PermissionsResult> | undefined): boolean;
5172
+ }
5009
5173
  /**
5010
5174
  * @generated from message trading.v1.PriorityOrderInfo
5011
5175
  */
@@ -6146,6 +6310,10 @@ export declare class CreatePlanRequest extends Message<CreatePlanRequest> {
6146
6310
  * @generated from field: optional trading.v1.WalletExecutionContext wallet_execution_context = 3;
6147
6311
  */
6148
6312
  walletExecutionContext?: WalletExecutionContext;
6313
+ /**
6314
+ * @generated from field: optional trading.v1.UrgencyWithOverrides urgency_overrides = 4;
6315
+ */
6316
+ urgencyOverrides?: UrgencyWithOverrides;
6149
6317
  constructor(data?: PartialMessage<CreatePlanRequest>);
6150
6318
  static readonly runtime: typeof proto3;
6151
6319
  static readonly typeName = "trading.v1.CreatePlanRequest";
@@ -149,6 +149,10 @@ export var ChainId;
149
149
  * @generated from enum value: LINEA = 59144;
150
150
  */
151
151
  ChainId[ChainId["LINEA"] = 59144] = "LINEA";
152
+ /**
153
+ * @generated from enum value: MEGAETH = 4326;
154
+ */
155
+ ChainId[ChainId["MEGAETH"] = 4326] = "MEGAETH";
152
156
  /**
153
157
  * @generated from enum value: TEMPO = 4217;
154
158
  */
@@ -178,6 +182,7 @@ proto3.util.setEnumType(ChainId, "trading.v1.ChainId", [
178
182
  { no: 1868, name: "SONEIUM" },
179
183
  { no: 196, name: "XLAYER" },
180
184
  { no: 59144, name: "LINEA" },
185
+ { no: 4326, name: "MEGAETH" },
181
186
  { no: 4217, name: "TEMPO" },
182
187
  ]);
183
188
  /**
@@ -205,6 +210,10 @@ export var Protocols;
205
210
  * @generated from enum value: UNISWAPX_V3 = 5;
206
211
  */
207
212
  Protocols[Protocols["UNISWAPX_V3"] = 5] = "UNISWAPX_V3";
213
+ /**
214
+ * @generated from enum value: UNISWAPX_LATEST = 6;
215
+ */
216
+ Protocols[Protocols["UNISWAPX_LATEST"] = 6] = "UNISWAPX_LATEST";
208
217
  })(Protocols || (Protocols = {}));
209
218
  // Retrieve enum metadata with: proto3.getEnumType(Protocols)
210
219
  proto3.util.setEnumType(Protocols, "trading.v1.Protocols", [
@@ -213,6 +222,7 @@ proto3.util.setEnumType(Protocols, "trading.v1.Protocols", [
213
222
  { no: 2, name: "V4" },
214
223
  { no: 4, name: "UNISWAPX_V2" },
215
224
  { no: 5, name: "UNISWAPX_V3" },
225
+ { no: 6, name: "UNISWAPX_LATEST" },
216
226
  ]);
217
227
  /**
218
228
  * @generated from enum trading.v1.RoutingPreference
@@ -1138,6 +1148,7 @@ Swap5792Request.fields = proto3.util.newFieldList(() => [
1138
1148
  { no: 4, name: "permit_data", kind: "message", T: PermitSingleData, opt: true },
1139
1149
  { no: 5, name: "deadline", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
1140
1150
  { no: 6, name: "urgency", kind: "enum", T: proto3.getEnumType(Urgency), opt: true },
1151
+ { no: 7, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
1141
1152
  ]);
1142
1153
  /**
1143
1154
  * @generated from message trading.v1.Swap5792Response
@@ -1770,6 +1781,81 @@ Token.fields = proto3.util.newFieldList(() => [
1770
1781
  { no: 5, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1771
1782
  { no: 6, name: "project", kind: "message", T: TokenProject },
1772
1783
  ]);
1784
+ /**
1785
+ * Caller-supplied caps applied on top of the gas service's computed quote.
1786
+ * All fields are absolute wei (decimal string). The gas service applies
1787
+ * max_priority_fee_per_gas / max_fee_per_gas as caps only — they lower the
1788
+ * quote, never raise it. gas_limit, if set, replaces the limit calculation
1789
+ * entirely.
1790
+ *
1791
+ * TAPI deliberately bundles gas_limit into UrgencyOverrides for a
1792
+ * REST-friendly client API. Trading's translation layer extracts gas_limit
1793
+ * out to the top-level gas_limit field on the unirpc-v2 request before
1794
+ * forwarding; unirpc-v2's `GasOverrides` proto carries only the fee-market
1795
+ * fields.
1796
+ *
1797
+ * @generated from message trading.v1.UrgencyOverrides
1798
+ */
1799
+ export class UrgencyOverrides extends Message {
1800
+ constructor(data) {
1801
+ super();
1802
+ proto3.util.initPartial(data, this);
1803
+ }
1804
+ static fromBinary(bytes, options) {
1805
+ return new UrgencyOverrides().fromBinary(bytes, options);
1806
+ }
1807
+ static fromJson(jsonValue, options) {
1808
+ return new UrgencyOverrides().fromJson(jsonValue, options);
1809
+ }
1810
+ static fromJsonString(jsonString, options) {
1811
+ return new UrgencyOverrides().fromJsonString(jsonString, options);
1812
+ }
1813
+ static equals(a, b) {
1814
+ return proto3.util.equals(UrgencyOverrides, a, b);
1815
+ }
1816
+ }
1817
+ UrgencyOverrides.runtime = proto3;
1818
+ UrgencyOverrides.typeName = "trading.v1.UrgencyOverrides";
1819
+ UrgencyOverrides.fields = proto3.util.newFieldList(() => [
1820
+ { no: 1, name: "max_priority_fee_per_gas", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1821
+ { no: 2, name: "max_fee_per_gas", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1822
+ { no: 3, name: "gas_limit", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1823
+ ]);
1824
+ /**
1825
+ * High-level fee tier selection with optional caps. Mutually exclusive
1826
+ * with the legacy `urgency` enum field and `gas_strategies` on each
1827
+ * request — only one form of gas selection should be set.
1828
+ *
1829
+ * @generated from message trading.v1.UrgencyWithOverrides
1830
+ */
1831
+ export class UrgencyWithOverrides extends Message {
1832
+ constructor(data) {
1833
+ super();
1834
+ /**
1835
+ * @generated from field: trading.v1.Urgency level = 1;
1836
+ */
1837
+ this.level = Urgency.NORMAL;
1838
+ proto3.util.initPartial(data, this);
1839
+ }
1840
+ static fromBinary(bytes, options) {
1841
+ return new UrgencyWithOverrides().fromBinary(bytes, options);
1842
+ }
1843
+ static fromJson(jsonValue, options) {
1844
+ return new UrgencyWithOverrides().fromJson(jsonValue, options);
1845
+ }
1846
+ static fromJsonString(jsonString, options) {
1847
+ return new UrgencyWithOverrides().fromJsonString(jsonString, options);
1848
+ }
1849
+ static equals(a, b) {
1850
+ return proto3.util.equals(UrgencyWithOverrides, a, b);
1851
+ }
1852
+ }
1853
+ UrgencyWithOverrides.runtime = proto3;
1854
+ UrgencyWithOverrides.typeName = "trading.v1.UrgencyWithOverrides";
1855
+ UrgencyWithOverrides.fields = proto3.util.newFieldList(() => [
1856
+ { no: 1, name: "level", kind: "enum", T: proto3.getEnumType(Urgency) },
1857
+ { no: 2, name: "overrides", kind: "message", T: UrgencyOverrides, opt: true },
1858
+ ]);
1773
1859
  /**
1774
1860
  * @generated from message trading.v1.GasStrategy
1775
1861
  */
@@ -1864,7 +1950,8 @@ export class QuoteRequest extends Message {
1864
1950
  */
1865
1951
  this.spreadOptimization = SpreadOptimization.EXECUTION;
1866
1952
  /**
1867
- * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 14;
1953
+ * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 14 [deprecated = true];
1954
+ * @deprecated
1868
1955
  */
1869
1956
  this.gasStrategies = [];
1870
1957
  /**
@@ -1913,6 +2000,7 @@ QuoteRequest.fields = proto3.util.newFieldList(() => [
1913
2000
  { no: 20, name: "integrator_fees", kind: "message", T: IntegratorFee, repeated: true },
1914
2001
  { no: 21, name: "wallet_execution_context", kind: "message", T: WalletExecutionContext, opt: true },
1915
2002
  { no: 22, name: "recipient", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2003
+ { no: 23, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
1916
2004
  ]);
1917
2005
  /**
1918
2006
  * @generated from message trading.v1.IntegratorFee
@@ -3797,7 +3885,8 @@ export class SwapRequest extends Message {
3797
3885
  */
3798
3886
  this.quote = { case: undefined };
3799
3887
  /**
3800
- * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 12;
3888
+ * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 12 [deprecated = true];
3889
+ * @deprecated
3801
3890
  */
3802
3891
  this.gasStrategies = [];
3803
3892
  proto3.util.initPartial(data, this);
@@ -3831,6 +3920,7 @@ SwapRequest.fields = proto3.util.newFieldList(() => [
3831
3920
  { no: 11, name: "urgency", kind: "enum", T: proto3.getEnumType(Urgency), opt: true },
3832
3921
  { no: 12, name: "gas_strategies", kind: "message", T: GasStrategy, repeated: true },
3833
3922
  { no: 13, name: "include_gas_info", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
3923
+ { no: 14, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
3834
3924
  ]);
3835
3925
  /**
3836
3926
  * @generated from message trading.v1.SwapResponse
@@ -3903,7 +3993,8 @@ export class Swap7702Request extends Message {
3903
3993
  */
3904
3994
  this.deadline = protoInt64.zero;
3905
3995
  /**
3906
- * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 10;
3996
+ * @generated from field: repeated trading.v1.GasStrategy gas_strategies = 10 [deprecated = true];
3997
+ * @deprecated
3907
3998
  */
3908
3999
  this.gasStrategies = [];
3909
4000
  proto3.util.initPartial(data, this);
@@ -3934,6 +4025,7 @@ Swap7702Request.fields = proto3.util.newFieldList(() => [
3934
4025
  { no: 8, name: "deadline", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
3935
4026
  { no: 9, name: "urgency", kind: "enum", T: proto3.getEnumType(Urgency), opt: true },
3936
4027
  { no: 10, name: "gas_strategies", kind: "message", T: GasStrategy, repeated: true },
4028
+ { no: 11, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
3937
4029
  ]);
3938
4030
  /**
3939
4031
  * @generated from message trading.v1.Swap7702Response
@@ -4171,10 +4263,6 @@ export class Customer extends Message {
4171
4263
  * @generated from field: string name = 2;
4172
4264
  */
4173
4265
  this.name = "";
4174
- /**
4175
- * @generated from field: bool isInternal = 3;
4176
- */
4177
- this.isInternal = false;
4178
4266
  /**
4179
4267
  * @generated from field: string createdAt = 4;
4180
4268
  */
@@ -4215,7 +4303,6 @@ Customer.typeName = "trading.v1.Customer";
4215
4303
  Customer.fields = proto3.util.newFieldList(() => [
4216
4304
  { no: 1, name: "hash", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4217
4305
  { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4218
- { no: 3, name: "isInternal", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
4219
4306
  { no: 4, name: "createdAt", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4220
4307
  { no: 5, name: "modifiedAt", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4221
4308
  { no: 6, name: "usagePlanId", kind: "scalar", T: 9 /* ScalarType.STRING */ },
@@ -4233,10 +4320,6 @@ export class CreateCustomerRequest extends Message {
4233
4320
  * @generated from field: string name = 1;
4234
4321
  */
4235
4322
  this.name = "";
4236
- /**
4237
- * @generated from field: bool isInternal = 2;
4238
- */
4239
- this.isInternal = false;
4240
4323
  /**
4241
4324
  * @generated from field: string createdBy = 3;
4242
4325
  */
@@ -4260,7 +4343,6 @@ CreateCustomerRequest.runtime = proto3;
4260
4343
  CreateCustomerRequest.typeName = "trading.v1.CreateCustomerRequest";
4261
4344
  CreateCustomerRequest.fields = proto3.util.newFieldList(() => [
4262
4345
  { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4263
- { no: 2, name: "isInternal", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
4264
4346
  { no: 3, name: "createdBy", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4265
4347
  ]);
4266
4348
  /**
@@ -4430,10 +4512,6 @@ export class UpdateCustomerRequest extends Message {
4430
4512
  * @generated from field: string name = 2;
4431
4513
  */
4432
4514
  this.name = "";
4433
- /**
4434
- * @generated from field: bool isInternal = 3;
4435
- */
4436
- this.isInternal = false;
4437
4515
  proto3.util.initPartial(data, this);
4438
4516
  }
4439
4517
  static fromBinary(bytes, options) {
@@ -4453,7 +4531,6 @@ UpdateCustomerRequest.runtime = proto3;
4453
4531
  UpdateCustomerRequest.typeName = "trading.v1.UpdateCustomerRequest";
4454
4532
  UpdateCustomerRequest.fields = proto3.util.newFieldList(() => [
4455
4533
  { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
4456
- { no: 3, name: "isInternal", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
4457
4534
  ]);
4458
4535
  /**
4459
4536
  * @generated from message trading.v1.UpdateCustomerResponse
@@ -5868,6 +5945,7 @@ CheckApprovalRequest.fields = proto3.util.newFieldList(() => [
5868
5945
  { no: 6, name: "include_gas_info", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
5869
5946
  { no: 7, name: "token_out", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
5870
5947
  { no: 8, name: "token_out_chain_id", kind: "enum", T: proto3.getEnumType(ChainId), opt: true },
5948
+ { no: 9, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
5871
5949
  ]);
5872
5950
  /**
5873
5951
  * @generated from message trading.v1.CheckApprovalResponse
@@ -5908,6 +5986,119 @@ CheckApprovalResponse.fields = proto3.util.newFieldList(() => [
5908
5986
  { no: 5, name: "cancel_gas_fee", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
5909
5987
  { no: 6, name: "gas_estimates", kind: "message", T: GasEstimate, repeated: true },
5910
5988
  ]);
5989
+ /**
5990
+ * @generated from message trading.v1.PermissionsRequest
5991
+ */
5992
+ export class PermissionsRequest extends Message {
5993
+ constructor(data) {
5994
+ super();
5995
+ /**
5996
+ * @generated from field: string wallet_address = 1;
5997
+ */
5998
+ this.walletAddress = "";
5999
+ /**
6000
+ * @generated from field: repeated string tokens = 2;
6001
+ */
6002
+ this.tokens = [];
6003
+ /**
6004
+ * @generated from field: trading.v1.ChainId chain_id = 3;
6005
+ */
6006
+ this.chainId = ChainId.CHAIN_ID_UNSPECIFIED;
6007
+ proto3.util.initPartial(data, this);
6008
+ }
6009
+ static fromBinary(bytes, options) {
6010
+ return new PermissionsRequest().fromBinary(bytes, options);
6011
+ }
6012
+ static fromJson(jsonValue, options) {
6013
+ return new PermissionsRequest().fromJson(jsonValue, options);
6014
+ }
6015
+ static fromJsonString(jsonString, options) {
6016
+ return new PermissionsRequest().fromJsonString(jsonString, options);
6017
+ }
6018
+ static equals(a, b) {
6019
+ return proto3.util.equals(PermissionsRequest, a, b);
6020
+ }
6021
+ }
6022
+ PermissionsRequest.runtime = proto3;
6023
+ PermissionsRequest.typeName = "trading.v1.PermissionsRequest";
6024
+ PermissionsRequest.fields = proto3.util.newFieldList(() => [
6025
+ { no: 1, name: "wallet_address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
6026
+ { no: 2, name: "tokens", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
6027
+ { no: 3, name: "chain_id", kind: "enum", T: proto3.getEnumType(ChainId) },
6028
+ ]);
6029
+ /**
6030
+ * @generated from message trading.v1.PermissionsResponse
6031
+ */
6032
+ export class PermissionsResponse extends Message {
6033
+ constructor(data) {
6034
+ super();
6035
+ /**
6036
+ * @generated from field: string request_id = 1;
6037
+ */
6038
+ this.requestId = "";
6039
+ /**
6040
+ * @generated from field: repeated trading.v1.PermissionsResult results = 2;
6041
+ */
6042
+ this.results = [];
6043
+ proto3.util.initPartial(data, this);
6044
+ }
6045
+ static fromBinary(bytes, options) {
6046
+ return new PermissionsResponse().fromBinary(bytes, options);
6047
+ }
6048
+ static fromJson(jsonValue, options) {
6049
+ return new PermissionsResponse().fromJson(jsonValue, options);
6050
+ }
6051
+ static fromJsonString(jsonString, options) {
6052
+ return new PermissionsResponse().fromJsonString(jsonString, options);
6053
+ }
6054
+ static equals(a, b) {
6055
+ return proto3.util.equals(PermissionsResponse, a, b);
6056
+ }
6057
+ }
6058
+ PermissionsResponse.runtime = proto3;
6059
+ PermissionsResponse.typeName = "trading.v1.PermissionsResponse";
6060
+ PermissionsResponse.fields = proto3.util.newFieldList(() => [
6061
+ { no: 1, name: "request_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
6062
+ { no: 2, name: "results", kind: "message", T: PermissionsResult, repeated: true },
6063
+ ]);
6064
+ /**
6065
+ * @generated from message trading.v1.PermissionsResult
6066
+ */
6067
+ export class PermissionsResult extends Message {
6068
+ constructor(data) {
6069
+ super();
6070
+ /**
6071
+ * @generated from field: string token = 1;
6072
+ */
6073
+ this.token = "";
6074
+ /**
6075
+ * @generated from field: bool is_permissioned = 2;
6076
+ */
6077
+ this.isPermissioned = false;
6078
+ proto3.util.initPartial(data, this);
6079
+ }
6080
+ static fromBinary(bytes, options) {
6081
+ return new PermissionsResult().fromBinary(bytes, options);
6082
+ }
6083
+ static fromJson(jsonValue, options) {
6084
+ return new PermissionsResult().fromJson(jsonValue, options);
6085
+ }
6086
+ static fromJsonString(jsonString, options) {
6087
+ return new PermissionsResult().fromJsonString(jsonString, options);
6088
+ }
6089
+ static equals(a, b) {
6090
+ return proto3.util.equals(PermissionsResult, a, b);
6091
+ }
6092
+ }
6093
+ PermissionsResult.runtime = proto3;
6094
+ PermissionsResult.typeName = "trading.v1.PermissionsResult";
6095
+ PermissionsResult.fields = proto3.util.newFieldList(() => [
6096
+ { no: 1, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
6097
+ { no: 2, name: "is_permissioned", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
6098
+ { no: 3, name: "is_allowlisted", kind: "scalar", T: 8 /* ScalarType.BOOL */, opt: true },
6099
+ { no: 4, name: "adapter_token_address", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
6100
+ { no: 5, name: "kyc_url", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
6101
+ ]);
5911
6102
  /**
5912
6103
  * @generated from message trading.v1.PriorityOrderInfo
5913
6104
  */
@@ -7264,6 +7455,7 @@ CreatePlanRequest.fields = proto3.util.newFieldList(() => [
7264
7455
  { no: 1, name: "routing", kind: "enum", T: proto3.getEnumType(SwapType) },
7265
7456
  { no: 2, name: "quote", kind: "message", T: ChainedQuote },
7266
7457
  { no: 3, name: "wallet_execution_context", kind: "message", T: WalletExecutionContext, opt: true },
7458
+ { no: 4, name: "urgency_overrides", kind: "message", T: UrgencyWithOverrides, opt: true },
7267
7459
  ]);
7268
7460
  /**
7269
7461
  * @generated from message trading.v1.GetPlanRequest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/client-trading",
3
- "version": "0.2.2",
3
+ "version": "0.4.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },