@uniswap/client-platform-service 0.0.24 → 0.0.28
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 +75 -0
- package/dist/uniswap/platformservice/v1/gasFeeSponsorshipService_pb.js +101 -0
- 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
|
+
]);
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
2
|
import { Message, proto3, Timestamp, Value } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* @generated from enum uniswap.platformservice.v1.AllowanceUnit
|
|
5
|
+
*/
|
|
6
|
+
export declare enum AllowanceUnit {
|
|
7
|
+
/**
|
|
8
|
+
* @generated from enum value: ALLOWANCE_UNIT_UNSPECIFIED = 0;
|
|
9
|
+
*/
|
|
10
|
+
UNSPECIFIED = 0,
|
|
11
|
+
/**
|
|
12
|
+
* @generated from enum value: ALLOWANCE_UNIT_FREE_SWAPS = 1;
|
|
13
|
+
*/
|
|
14
|
+
FREE_SWAPS = 1,
|
|
15
|
+
/**
|
|
16
|
+
* US cents. Reserved; not yet populated server-side.
|
|
17
|
+
*
|
|
18
|
+
* @generated from enum value: ALLOWANCE_UNIT_USD_CENT = 2;
|
|
19
|
+
*/
|
|
20
|
+
USD_CENT = 2
|
|
21
|
+
}
|
|
3
22
|
/**
|
|
4
23
|
* @generated from message uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsRequest
|
|
5
24
|
*/
|
|
@@ -195,6 +214,33 @@ export declare class SponsorshipCampaign extends Message<SponsorshipCampaign> {
|
|
|
195
214
|
* @generated from field: string sponsor_logo_url = 6;
|
|
196
215
|
*/
|
|
197
216
|
sponsorLogoUrl: string;
|
|
217
|
+
/**
|
|
218
|
+
* Human-readable headline, e.g. "Welcome to Uniswap". Distinct from `name`
|
|
219
|
+
* (machine id) and `description` (subheader).
|
|
220
|
+
*
|
|
221
|
+
* @generated from field: string headline = 7;
|
|
222
|
+
*/
|
|
223
|
+
headline: string;
|
|
224
|
+
/**
|
|
225
|
+
* Image asset for this campaign, rendered as the UI thumbnail. Distinct from
|
|
226
|
+
* `sponsor_logo_url`.
|
|
227
|
+
*
|
|
228
|
+
* @generated from field: string thumbnail_url = 8;
|
|
229
|
+
*/
|
|
230
|
+
thumbnailUrl: string;
|
|
231
|
+
/**
|
|
232
|
+
* Per-wallet caps + utilization, one entry per dimension (free-swap count
|
|
233
|
+
* and/or cost). Empty when the campaign has no per-wallet cap.
|
|
234
|
+
*
|
|
235
|
+
* @generated from field: repeated uniswap.platformservice.v1.SponsorshipAllowance allowances = 9;
|
|
236
|
+
*/
|
|
237
|
+
allowances: SponsorshipAllowance[];
|
|
238
|
+
/**
|
|
239
|
+
* Chain IDs the campaign covers, for the client "eligible chains" modal.
|
|
240
|
+
*
|
|
241
|
+
* @generated from field: repeated uint32 eligible_chains = 10;
|
|
242
|
+
*/
|
|
243
|
+
eligibleChains: number[];
|
|
198
244
|
constructor(data?: PartialMessage<SponsorshipCampaign>);
|
|
199
245
|
static readonly runtime: typeof proto3;
|
|
200
246
|
static readonly typeName = "uniswap.platformservice.v1.SponsorshipCampaign";
|
|
@@ -204,6 +250,35 @@ export declare class SponsorshipCampaign extends Message<SponsorshipCampaign> {
|
|
|
204
250
|
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SponsorshipCampaign;
|
|
205
251
|
static equals(a: SponsorshipCampaign | PlainMessage<SponsorshipCampaign> | undefined, b: SponsorshipCampaign | PlainMessage<SponsorshipCampaign> | undefined): boolean;
|
|
206
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Drives the client display, e.g. "5 of 5 free swaps remaining" or "$2 of $10".
|
|
255
|
+
*
|
|
256
|
+
* @generated from message uniswap.platformservice.v1.SponsorshipAllowance
|
|
257
|
+
*/
|
|
258
|
+
export declare class SponsorshipAllowance extends Message<SponsorshipAllowance> {
|
|
259
|
+
/**
|
|
260
|
+
* @generated from field: uniswap.platformservice.v1.AllowanceUnit unit = 1;
|
|
261
|
+
*/
|
|
262
|
+
unit: AllowanceUnit;
|
|
263
|
+
/**
|
|
264
|
+
* Integer strings (BigInt-safe); USD_CENT is in cents. used = total - remaining.
|
|
265
|
+
*
|
|
266
|
+
* @generated from field: string total = 2;
|
|
267
|
+
*/
|
|
268
|
+
total: string;
|
|
269
|
+
/**
|
|
270
|
+
* @generated from field: string remaining = 3;
|
|
271
|
+
*/
|
|
272
|
+
remaining: string;
|
|
273
|
+
constructor(data?: PartialMessage<SponsorshipAllowance>);
|
|
274
|
+
static readonly runtime: typeof proto3;
|
|
275
|
+
static readonly typeName = "uniswap.platformservice.v1.SponsorshipAllowance";
|
|
276
|
+
static readonly fields: FieldList;
|
|
277
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SponsorshipAllowance;
|
|
278
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SponsorshipAllowance;
|
|
279
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SponsorshipAllowance;
|
|
280
|
+
static equals(a: SponsorshipAllowance | PlainMessage<SponsorshipAllowance> | undefined, b: SponsorshipAllowance | PlainMessage<SponsorshipAllowance> | undefined): boolean;
|
|
281
|
+
}
|
|
207
282
|
/**
|
|
208
283
|
* @generated from message uniswap.platformservice.v1.Criterion
|
|
209
284
|
*/
|
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
import { Message, proto3, Timestamp, Value } from "@bufbuild/protobuf";
|
|
6
|
+
/**
|
|
7
|
+
* @generated from enum uniswap.platformservice.v1.AllowanceUnit
|
|
8
|
+
*/
|
|
9
|
+
export var AllowanceUnit;
|
|
10
|
+
(function (AllowanceUnit) {
|
|
11
|
+
/**
|
|
12
|
+
* @generated from enum value: ALLOWANCE_UNIT_UNSPECIFIED = 0;
|
|
13
|
+
*/
|
|
14
|
+
AllowanceUnit[AllowanceUnit["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
15
|
+
/**
|
|
16
|
+
* @generated from enum value: ALLOWANCE_UNIT_FREE_SWAPS = 1;
|
|
17
|
+
*/
|
|
18
|
+
AllowanceUnit[AllowanceUnit["FREE_SWAPS"] = 1] = "FREE_SWAPS";
|
|
19
|
+
/**
|
|
20
|
+
* US cents. Reserved; not yet populated server-side.
|
|
21
|
+
*
|
|
22
|
+
* @generated from enum value: ALLOWANCE_UNIT_USD_CENT = 2;
|
|
23
|
+
*/
|
|
24
|
+
AllowanceUnit[AllowanceUnit["USD_CENT"] = 2] = "USD_CENT";
|
|
25
|
+
})(AllowanceUnit || (AllowanceUnit = {}));
|
|
26
|
+
// Retrieve enum metadata with: proto3.getEnumType(AllowanceUnit)
|
|
27
|
+
proto3.util.setEnumType(AllowanceUnit, "uniswap.platformservice.v1.AllowanceUnit", [
|
|
28
|
+
{ no: 0, name: "ALLOWANCE_UNIT_UNSPECIFIED" },
|
|
29
|
+
{ no: 1, name: "ALLOWANCE_UNIT_FREE_SWAPS" },
|
|
30
|
+
{ no: 2, name: "ALLOWANCE_UNIT_USD_CENT" },
|
|
31
|
+
]);
|
|
6
32
|
/**
|
|
7
33
|
* @generated from message uniswap.platformservice.v1.ListEligibleGasFeeSponsorshipCampaignsRequest
|
|
8
34
|
*/
|
|
@@ -230,6 +256,33 @@ export class SponsorshipCampaign extends Message {
|
|
|
230
256
|
* @generated from field: string sponsor_logo_url = 6;
|
|
231
257
|
*/
|
|
232
258
|
this.sponsorLogoUrl = "";
|
|
259
|
+
/**
|
|
260
|
+
* Human-readable headline, e.g. "Welcome to Uniswap". Distinct from `name`
|
|
261
|
+
* (machine id) and `description` (subheader).
|
|
262
|
+
*
|
|
263
|
+
* @generated from field: string headline = 7;
|
|
264
|
+
*/
|
|
265
|
+
this.headline = "";
|
|
266
|
+
/**
|
|
267
|
+
* Image asset for this campaign, rendered as the UI thumbnail. Distinct from
|
|
268
|
+
* `sponsor_logo_url`.
|
|
269
|
+
*
|
|
270
|
+
* @generated from field: string thumbnail_url = 8;
|
|
271
|
+
*/
|
|
272
|
+
this.thumbnailUrl = "";
|
|
273
|
+
/**
|
|
274
|
+
* Per-wallet caps + utilization, one entry per dimension (free-swap count
|
|
275
|
+
* and/or cost). Empty when the campaign has no per-wallet cap.
|
|
276
|
+
*
|
|
277
|
+
* @generated from field: repeated uniswap.platformservice.v1.SponsorshipAllowance allowances = 9;
|
|
278
|
+
*/
|
|
279
|
+
this.allowances = [];
|
|
280
|
+
/**
|
|
281
|
+
* Chain IDs the campaign covers, for the client "eligible chains" modal.
|
|
282
|
+
*
|
|
283
|
+
* @generated from field: repeated uint32 eligible_chains = 10;
|
|
284
|
+
*/
|
|
285
|
+
this.eligibleChains = [];
|
|
233
286
|
proto3.util.initPartial(data, this);
|
|
234
287
|
}
|
|
235
288
|
static fromBinary(bytes, options) {
|
|
@@ -254,6 +307,54 @@ SponsorshipCampaign.fields = proto3.util.newFieldList(() => [
|
|
|
254
307
|
{ no: 4, name: "alchemy_policy_id", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "policyId" },
|
|
255
308
|
{ no: 5, name: "sponsor_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
256
309
|
{ no: 6, name: "sponsor_logo_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
310
|
+
{ no: 7, name: "headline", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
311
|
+
{ no: 8, name: "thumbnail_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
312
|
+
{ no: 9, name: "allowances", kind: "message", T: SponsorshipAllowance, repeated: true },
|
|
313
|
+
{ no: 10, name: "eligible_chains", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
|
|
314
|
+
]);
|
|
315
|
+
/**
|
|
316
|
+
* Drives the client display, e.g. "5 of 5 free swaps remaining" or "$2 of $10".
|
|
317
|
+
*
|
|
318
|
+
* @generated from message uniswap.platformservice.v1.SponsorshipAllowance
|
|
319
|
+
*/
|
|
320
|
+
export class SponsorshipAllowance extends Message {
|
|
321
|
+
constructor(data) {
|
|
322
|
+
super();
|
|
323
|
+
/**
|
|
324
|
+
* @generated from field: uniswap.platformservice.v1.AllowanceUnit unit = 1;
|
|
325
|
+
*/
|
|
326
|
+
this.unit = AllowanceUnit.UNSPECIFIED;
|
|
327
|
+
/**
|
|
328
|
+
* Integer strings (BigInt-safe); USD_CENT is in cents. used = total - remaining.
|
|
329
|
+
*
|
|
330
|
+
* @generated from field: string total = 2;
|
|
331
|
+
*/
|
|
332
|
+
this.total = "";
|
|
333
|
+
/**
|
|
334
|
+
* @generated from field: string remaining = 3;
|
|
335
|
+
*/
|
|
336
|
+
this.remaining = "";
|
|
337
|
+
proto3.util.initPartial(data, this);
|
|
338
|
+
}
|
|
339
|
+
static fromBinary(bytes, options) {
|
|
340
|
+
return new SponsorshipAllowance().fromBinary(bytes, options);
|
|
341
|
+
}
|
|
342
|
+
static fromJson(jsonValue, options) {
|
|
343
|
+
return new SponsorshipAllowance().fromJson(jsonValue, options);
|
|
344
|
+
}
|
|
345
|
+
static fromJsonString(jsonString, options) {
|
|
346
|
+
return new SponsorshipAllowance().fromJsonString(jsonString, options);
|
|
347
|
+
}
|
|
348
|
+
static equals(a, b) {
|
|
349
|
+
return proto3.util.equals(SponsorshipAllowance, a, b);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
SponsorshipAllowance.runtime = proto3;
|
|
353
|
+
SponsorshipAllowance.typeName = "uniswap.platformservice.v1.SponsorshipAllowance";
|
|
354
|
+
SponsorshipAllowance.fields = proto3.util.newFieldList(() => [
|
|
355
|
+
{ no: 1, name: "unit", kind: "enum", T: proto3.getEnumType(AllowanceUnit) },
|
|
356
|
+
{ no: 2, name: "total", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
357
|
+
{ no: 3, name: "remaining", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
257
358
|
]);
|
|
258
359
|
/**
|
|
259
360
|
* @generated from message uniswap.platformservice.v1.Criterion
|