@uniswap/client-platform-service 0.0.23 → 0.0.25
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.
- package/dist/uniswap/platformservice/v1/experimentHeader_pb.d.ts +50 -0
- package/dist/uniswap/platformservice/v1/experimentHeader_pb.js +72 -0
- package/dist/uniswap/platformservice/v1/gasFeeSponsorshipService_pb.d.ts +42 -2
- package/dist/uniswap/platformservice/v1/gasFeeSponsorshipService_pb.js +53 -2
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { Message, proto3, Struct } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a single experiment result, as sent in the x-experiments header.
|
|
5
|
+
*
|
|
6
|
+
* @generated from message uniswap.platformservice.v1.Experiment
|
|
7
|
+
*/
|
|
8
|
+
export declare class Experiment extends Message<Experiment> {
|
|
9
|
+
/**
|
|
10
|
+
* The experiment group the user is assigned to (e.g. "treatment", "control").
|
|
11
|
+
*
|
|
12
|
+
* @generated from field: string group_name = 1;
|
|
13
|
+
*/
|
|
14
|
+
groupName: string;
|
|
15
|
+
/**
|
|
16
|
+
* Parameter values for this experiment (e.g. {"param_1": "data_1"}).
|
|
17
|
+
*
|
|
18
|
+
* @generated from field: google.protobuf.Struct value = 2;
|
|
19
|
+
*/
|
|
20
|
+
value?: Struct;
|
|
21
|
+
constructor(data?: PartialMessage<Experiment>);
|
|
22
|
+
static readonly runtime: typeof proto3;
|
|
23
|
+
static readonly typeName = "uniswap.platformservice.v1.Experiment";
|
|
24
|
+
static readonly fields: FieldList;
|
|
25
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Experiment;
|
|
26
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Experiment;
|
|
27
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Experiment;
|
|
28
|
+
static equals(a: Experiment | PlainMessage<Experiment> | undefined, b: Experiment | PlainMessage<Experiment> | undefined): boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Map of experiment name → result, representing the full x-experiments header payload.
|
|
32
|
+
*
|
|
33
|
+
* @generated from message uniswap.platformservice.v1.Experiments
|
|
34
|
+
*/
|
|
35
|
+
export declare class Experiments extends Message<Experiments> {
|
|
36
|
+
/**
|
|
37
|
+
* @generated from field: map<string, uniswap.platformservice.v1.Experiment> experiments = 1;
|
|
38
|
+
*/
|
|
39
|
+
experiments: {
|
|
40
|
+
[key: string]: Experiment;
|
|
41
|
+
};
|
|
42
|
+
constructor(data?: PartialMessage<Experiments>);
|
|
43
|
+
static readonly runtime: typeof proto3;
|
|
44
|
+
static readonly typeName = "uniswap.platformservice.v1.Experiments";
|
|
45
|
+
static readonly fields: FieldList;
|
|
46
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Experiments;
|
|
47
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Experiments;
|
|
48
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Experiments;
|
|
49
|
+
static equals(a: Experiments | PlainMessage<Experiments> | undefined, b: Experiments | PlainMessage<Experiments> | undefined): boolean;
|
|
50
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.1 with parameter "target=ts"
|
|
2
|
+
// @generated from file uniswap/platformservice/v1/experimentHeader.proto (package uniswap.platformservice.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { Message, proto3, Struct } from "@bufbuild/protobuf";
|
|
6
|
+
/**
|
|
7
|
+
* Represents a single experiment result, as sent in the x-experiments header.
|
|
8
|
+
*
|
|
9
|
+
* @generated from message uniswap.platformservice.v1.Experiment
|
|
10
|
+
*/
|
|
11
|
+
export class Experiment extends Message {
|
|
12
|
+
constructor(data) {
|
|
13
|
+
super();
|
|
14
|
+
/**
|
|
15
|
+
* The experiment group the user is assigned to (e.g. "treatment", "control").
|
|
16
|
+
*
|
|
17
|
+
* @generated from field: string group_name = 1;
|
|
18
|
+
*/
|
|
19
|
+
this.groupName = "";
|
|
20
|
+
proto3.util.initPartial(data, this);
|
|
21
|
+
}
|
|
22
|
+
static fromBinary(bytes, options) {
|
|
23
|
+
return new Experiment().fromBinary(bytes, options);
|
|
24
|
+
}
|
|
25
|
+
static fromJson(jsonValue, options) {
|
|
26
|
+
return new Experiment().fromJson(jsonValue, options);
|
|
27
|
+
}
|
|
28
|
+
static fromJsonString(jsonString, options) {
|
|
29
|
+
return new Experiment().fromJsonString(jsonString, options);
|
|
30
|
+
}
|
|
31
|
+
static equals(a, b) {
|
|
32
|
+
return proto3.util.equals(Experiment, a, b);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
Experiment.runtime = proto3;
|
|
36
|
+
Experiment.typeName = "uniswap.platformservice.v1.Experiment";
|
|
37
|
+
Experiment.fields = proto3.util.newFieldList(() => [
|
|
38
|
+
{ no: 1, name: "group_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
39
|
+
{ no: 2, name: "value", kind: "message", T: Struct },
|
|
40
|
+
]);
|
|
41
|
+
/**
|
|
42
|
+
* Map of experiment name → result, representing the full x-experiments header payload.
|
|
43
|
+
*
|
|
44
|
+
* @generated from message uniswap.platformservice.v1.Experiments
|
|
45
|
+
*/
|
|
46
|
+
export class Experiments extends Message {
|
|
47
|
+
constructor(data) {
|
|
48
|
+
super();
|
|
49
|
+
/**
|
|
50
|
+
* @generated from field: map<string, uniswap.platformservice.v1.Experiment> experiments = 1;
|
|
51
|
+
*/
|
|
52
|
+
this.experiments = {};
|
|
53
|
+
proto3.util.initPartial(data, this);
|
|
54
|
+
}
|
|
55
|
+
static fromBinary(bytes, options) {
|
|
56
|
+
return new Experiments().fromBinary(bytes, options);
|
|
57
|
+
}
|
|
58
|
+
static fromJson(jsonValue, options) {
|
|
59
|
+
return new Experiments().fromJson(jsonValue, options);
|
|
60
|
+
}
|
|
61
|
+
static fromJsonString(jsonString, options) {
|
|
62
|
+
return new Experiments().fromJsonString(jsonString, options);
|
|
63
|
+
}
|
|
64
|
+
static equals(a, b) {
|
|
65
|
+
return proto3.util.equals(Experiments, a, b);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
Experiments.runtime = proto3;
|
|
69
|
+
Experiments.typeName = "uniswap.platformservice.v1.Experiments";
|
|
70
|
+
Experiments.fields = proto3.util.newFieldList(() => [
|
|
71
|
+
{ no: 1, name: "experiments", kind: "map", K: 9 /* ScalarType.STRING */, V: { kind: "message", T: Experiment } },
|
|
72
|
+
]);
|
|
@@ -6,8 +6,8 @@ import { Message, proto3, Timestamp, Value } from "@bufbuild/protobuf";
|
|
|
6
6
|
export declare class ListEligibleGasFeeSponsorshipCampaignsRequest extends Message<ListEligibleGasFeeSponsorshipCampaignsRequest> {
|
|
7
7
|
/**
|
|
8
8
|
* The user-intended on-chain action being evaluated for sponsorship.
|
|
9
|
-
* Variants cover swap/wrap/bridge today; additional types such as
|
|
10
|
-
* provision will be added as new cases.
|
|
9
|
+
* Variants cover swap/wrap/bridge/approval today; additional types such as
|
|
10
|
+
* liquidity provision will be added as new cases.
|
|
11
11
|
*
|
|
12
12
|
* @generated from oneof uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsRequest.intent
|
|
13
13
|
*/
|
|
@@ -29,6 +29,12 @@ export declare class ListEligibleGasFeeSponsorshipCampaignsRequest extends Messa
|
|
|
29
29
|
*/
|
|
30
30
|
value: BridgeQuote;
|
|
31
31
|
case: "bridgeQuote";
|
|
32
|
+
} | {
|
|
33
|
+
/**
|
|
34
|
+
* @generated from field: uniswap.platformservice.v1.ApprovalIntent approval_intent = 4;
|
|
35
|
+
*/
|
|
36
|
+
value: ApprovalIntent;
|
|
37
|
+
case: "approvalIntent";
|
|
32
38
|
} | {
|
|
33
39
|
case: undefined;
|
|
34
40
|
value?: undefined;
|
|
@@ -424,6 +430,40 @@ export declare class BridgeQuote extends Message<BridgeQuote> {
|
|
|
424
430
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): BridgeQuote;
|
|
425
431
|
static equals(a: BridgeQuote | PlainMessage<BridgeQuote> | undefined, b: BridgeQuote | PlainMessage<BridgeQuote> | undefined): boolean;
|
|
426
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* An ERC-20 approval being evaluated for sponsorship — the gasless precursor
|
|
435
|
+
* to a sponsored swap. Always same-chain (a token approval can't cross
|
|
436
|
+
* chains). `spender` is the contract being granted the allowance (e.g. the
|
|
437
|
+
* Universal Router or Permit2).
|
|
438
|
+
*
|
|
439
|
+
* @generated from message uniswap.platformservice.v1.ApprovalIntent
|
|
440
|
+
*/
|
|
441
|
+
export declare class ApprovalIntent extends Message<ApprovalIntent> {
|
|
442
|
+
/**
|
|
443
|
+
* @generated from field: uint32 chain_id = 1;
|
|
444
|
+
*/
|
|
445
|
+
chainId: number;
|
|
446
|
+
/**
|
|
447
|
+
* @generated from field: string swapper = 2;
|
|
448
|
+
*/
|
|
449
|
+
swapper: string;
|
|
450
|
+
/**
|
|
451
|
+
* @generated from field: string token = 3;
|
|
452
|
+
*/
|
|
453
|
+
token: string;
|
|
454
|
+
/**
|
|
455
|
+
* @generated from field: string spender = 4;
|
|
456
|
+
*/
|
|
457
|
+
spender: string;
|
|
458
|
+
constructor(data?: PartialMessage<ApprovalIntent>);
|
|
459
|
+
static readonly runtime: typeof proto3;
|
|
460
|
+
static readonly typeName = "uniswap.platformservice.v1.ApprovalIntent";
|
|
461
|
+
static readonly fields: FieldList;
|
|
462
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApprovalIntent;
|
|
463
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApprovalIntent;
|
|
464
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApprovalIntent;
|
|
465
|
+
static equals(a: ApprovalIntent | PlainMessage<ApprovalIntent> | undefined, b: ApprovalIntent | PlainMessage<ApprovalIntent> | undefined): boolean;
|
|
466
|
+
}
|
|
427
467
|
/**
|
|
428
468
|
* Standard JSON-RPC envelope for paymaster-only methods.
|
|
429
469
|
*
|
|
@@ -11,8 +11,8 @@ export class ListEligibleGasFeeSponsorshipCampaignsRequest extends Message {
|
|
|
11
11
|
super();
|
|
12
12
|
/**
|
|
13
13
|
* The user-intended on-chain action being evaluated for sponsorship.
|
|
14
|
-
* Variants cover swap/wrap/bridge today; additional types such as
|
|
15
|
-
* provision will be added as new cases.
|
|
14
|
+
* Variants cover swap/wrap/bridge/approval today; additional types such as
|
|
15
|
+
* liquidity provision will be added as new cases.
|
|
16
16
|
*
|
|
17
17
|
* @generated from oneof uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsRequest.intent
|
|
18
18
|
*/
|
|
@@ -38,6 +38,7 @@ ListEligibleGasFeeSponsorshipCampaignsRequest.fields = proto3.util.newFieldList(
|
|
|
38
38
|
{ no: 1, name: "classic_quote", kind: "message", T: ClassicQuote, oneof: "intent" },
|
|
39
39
|
{ no: 2, name: "wrap_unwrap_quote", kind: "message", T: WrapUnwrapQuote, oneof: "intent" },
|
|
40
40
|
{ no: 3, name: "bridge_quote", kind: "message", T: BridgeQuote, oneof: "intent" },
|
|
41
|
+
{ no: 4, name: "approval_intent", kind: "message", T: ApprovalIntent, oneof: "intent" },
|
|
41
42
|
]);
|
|
42
43
|
/**
|
|
43
44
|
* @generated from message uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsResponse
|
|
@@ -563,6 +564,56 @@ BridgeQuote.fields = proto3.util.newFieldList(() => [
|
|
|
563
564
|
{ no: 4, name: "token_in", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
564
565
|
{ no: 5, name: "token_out", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
565
566
|
]);
|
|
567
|
+
/**
|
|
568
|
+
* An ERC-20 approval being evaluated for sponsorship — the gasless precursor
|
|
569
|
+
* to a sponsored swap. Always same-chain (a token approval can't cross
|
|
570
|
+
* chains). `spender` is the contract being granted the allowance (e.g. the
|
|
571
|
+
* Universal Router or Permit2).
|
|
572
|
+
*
|
|
573
|
+
* @generated from message uniswap.platformservice.v1.ApprovalIntent
|
|
574
|
+
*/
|
|
575
|
+
export class ApprovalIntent extends Message {
|
|
576
|
+
constructor(data) {
|
|
577
|
+
super();
|
|
578
|
+
/**
|
|
579
|
+
* @generated from field: uint32 chain_id = 1;
|
|
580
|
+
*/
|
|
581
|
+
this.chainId = 0;
|
|
582
|
+
/**
|
|
583
|
+
* @generated from field: string swapper = 2;
|
|
584
|
+
*/
|
|
585
|
+
this.swapper = "";
|
|
586
|
+
/**
|
|
587
|
+
* @generated from field: string token = 3;
|
|
588
|
+
*/
|
|
589
|
+
this.token = "";
|
|
590
|
+
/**
|
|
591
|
+
* @generated from field: string spender = 4;
|
|
592
|
+
*/
|
|
593
|
+
this.spender = "";
|
|
594
|
+
proto3.util.initPartial(data, this);
|
|
595
|
+
}
|
|
596
|
+
static fromBinary(bytes, options) {
|
|
597
|
+
return new ApprovalIntent().fromBinary(bytes, options);
|
|
598
|
+
}
|
|
599
|
+
static fromJson(jsonValue, options) {
|
|
600
|
+
return new ApprovalIntent().fromJson(jsonValue, options);
|
|
601
|
+
}
|
|
602
|
+
static fromJsonString(jsonString, options) {
|
|
603
|
+
return new ApprovalIntent().fromJsonString(jsonString, options);
|
|
604
|
+
}
|
|
605
|
+
static equals(a, b) {
|
|
606
|
+
return proto3.util.equals(ApprovalIntent, a, b);
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
ApprovalIntent.runtime = proto3;
|
|
610
|
+
ApprovalIntent.typeName = "uniswap.platformservice.v1.ApprovalIntent";
|
|
611
|
+
ApprovalIntent.fields = proto3.util.newFieldList(() => [
|
|
612
|
+
{ no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
|
|
613
|
+
{ no: 2, name: "swapper", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
614
|
+
{ no: 3, name: "token", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
615
|
+
{ no: 4, name: "spender", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
616
|
+
]);
|
|
566
617
|
/**
|
|
567
618
|
* Standard JSON-RPC envelope for paymaster-only methods.
|
|
568
619
|
*
|