@uniswap/client-unirpc-v2 0.0.2 → 0.0.3
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/unirpc/v2/chain_config_pb.d.ts +12 -0
- package/dist/uniswap/unirpc/v2/chain_config_pb.js +8 -0
- package/dist/uniswap/unirpc/v2/provider_pb.d.ts +5 -1
- package/dist/uniswap/unirpc/v2/provider_pb.js +5 -0
- package/dist/uniswap/unirpc/v2/service_pb.d.ts +13 -4
- package/dist/uniswap/unirpc/v2/service_pb.js +2 -10
- package/package.json +1 -1
|
@@ -39,6 +39,18 @@ export declare class ChainProviderConfig extends Message<ChainProviderConfig> {
|
|
|
39
39
|
* @generated from field: uniswap.unirpc.v2.Alert alert = 3;
|
|
40
40
|
*/
|
|
41
41
|
alert?: Alert;
|
|
42
|
+
/**
|
|
43
|
+
* Optional per-provider/chain RPC call timeout in milliseconds. Falls back to service default if unset.
|
|
44
|
+
*
|
|
45
|
+
* @generated from field: optional uint32 timeout_ms = 4;
|
|
46
|
+
*/
|
|
47
|
+
timeoutMs?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Methods that this provider does not support. Requests containing any unsupported method will not be routed to this provider.
|
|
50
|
+
*
|
|
51
|
+
* @generated from field: repeated string unsupported_methods = 5;
|
|
52
|
+
*/
|
|
53
|
+
unsupportedMethods: string[];
|
|
42
54
|
constructor(data?: PartialMessage<ChainProviderConfig>);
|
|
43
55
|
static readonly runtime: typeof proto3;
|
|
44
56
|
static readonly typeName = "uniswap.unirpc.v2.ChainProviderConfig";
|
|
@@ -54,6 +54,12 @@ export class ChainProviderConfig extends Message {
|
|
|
54
54
|
* @generated from field: double weight = 2;
|
|
55
55
|
*/
|
|
56
56
|
this.weight = 0;
|
|
57
|
+
/**
|
|
58
|
+
* Methods that this provider does not support. Requests containing any unsupported method will not be routed to this provider.
|
|
59
|
+
*
|
|
60
|
+
* @generated from field: repeated string unsupported_methods = 5;
|
|
61
|
+
*/
|
|
62
|
+
this.unsupportedMethods = [];
|
|
57
63
|
proto3.util.initPartial(data, this);
|
|
58
64
|
}
|
|
59
65
|
static fromBinary(bytes, options) {
|
|
@@ -75,6 +81,8 @@ ChainProviderConfig.fields = proto3.util.newFieldList(() => [
|
|
|
75
81
|
{ no: 1, name: "provider", kind: "enum", T: proto3.getEnumType(Provider) },
|
|
76
82
|
{ no: 2, name: "weight", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
|
|
77
83
|
{ no: 3, name: "alert", kind: "message", T: Alert },
|
|
84
|
+
{ no: 4, name: "timeout_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
|
|
85
|
+
{ no: 5, name: "unsupported_methods", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
|
|
78
86
|
]);
|
|
79
87
|
/**
|
|
80
88
|
* @generated from message uniswap.unirpc.v2.Alert
|
|
@@ -35,7 +35,11 @@ export declare enum Provider {
|
|
|
35
35
|
/**
|
|
36
36
|
* @generated from enum value: PROVIDER_SELFHOST = 7;
|
|
37
37
|
*/
|
|
38
|
-
SELFHOST = 7
|
|
38
|
+
SELFHOST = 7,
|
|
39
|
+
/**
|
|
40
|
+
* @generated from enum value: PROVIDER_ALCHEMY_SHARED = 8;
|
|
41
|
+
*/
|
|
42
|
+
ALCHEMY_SHARED = 8
|
|
39
43
|
}
|
|
40
44
|
/**
|
|
41
45
|
* @generated from message uniswap.unirpc.v2.ProviderConfig
|
|
@@ -40,6 +40,10 @@ export var Provider;
|
|
|
40
40
|
* @generated from enum value: PROVIDER_SELFHOST = 7;
|
|
41
41
|
*/
|
|
42
42
|
Provider[Provider["SELFHOST"] = 7] = "SELFHOST";
|
|
43
|
+
/**
|
|
44
|
+
* @generated from enum value: PROVIDER_ALCHEMY_SHARED = 8;
|
|
45
|
+
*/
|
|
46
|
+
Provider[Provider["ALCHEMY_SHARED"] = 8] = "ALCHEMY_SHARED";
|
|
43
47
|
})(Provider || (Provider = {}));
|
|
44
48
|
// Retrieve enum metadata with: proto3.getEnumType(Provider)
|
|
45
49
|
proto3.util.setEnumType(Provider, "uniswap.unirpc.v2.Provider", [
|
|
@@ -51,6 +55,7 @@ proto3.util.setEnumType(Provider, "uniswap.unirpc.v2.Provider", [
|
|
|
51
55
|
{ no: 5, name: "PROVIDER_UNICHAINBETASERVICE" },
|
|
52
56
|
{ no: 6, name: "PROVIDER_MONADINFRA" },
|
|
53
57
|
{ no: 7, name: "PROVIDER_SELFHOST" },
|
|
58
|
+
{ no: 8, name: "PROVIDER_ALCHEMY_SHARED" },
|
|
54
59
|
]);
|
|
55
60
|
/**
|
|
56
61
|
* @generated from message uniswap.unirpc.v2.ProviderConfig
|
|
@@ -446,9 +446,15 @@ export declare class UniRpcRequest extends Message<UniRpcRequest> {
|
|
|
446
446
|
*/
|
|
447
447
|
jsonrpc: string;
|
|
448
448
|
/**
|
|
449
|
-
*
|
|
449
|
+
* proto3 `optional` gives the field explicit presence so that id=0 is
|
|
450
|
+
* preserved on the wire. Without it, int32 defaults to 0 and proto3 JSON
|
|
451
|
+
* serialization omits default-value scalars — which drops the id entirely
|
|
452
|
+
* when clients (e.g. viem's http transport) start numbering at 0, breaking
|
|
453
|
+
* JSON-RPC id correlation on the upstream round-trip.
|
|
454
|
+
*
|
|
455
|
+
* @generated from field: optional int32 id = 2;
|
|
450
456
|
*/
|
|
451
|
-
id
|
|
457
|
+
id?: number;
|
|
452
458
|
/**
|
|
453
459
|
* @generated from field: string method = 3;
|
|
454
460
|
*/
|
|
@@ -479,9 +485,12 @@ export declare class UniRpcResponse extends Message<UniRpcResponse> {
|
|
|
479
485
|
*/
|
|
480
486
|
jsonrpc: string;
|
|
481
487
|
/**
|
|
482
|
-
*
|
|
488
|
+
* See UniRpcRequest.id — `optional` is required to preserve id=0 through
|
|
489
|
+
* proto3 JSON (de)serialization when echoing the id back to the client.
|
|
490
|
+
*
|
|
491
|
+
* @generated from field: optional int32 id = 2;
|
|
483
492
|
*/
|
|
484
|
-
id
|
|
493
|
+
id?: number;
|
|
485
494
|
/**
|
|
486
495
|
* Result can be any valid JSON value
|
|
487
496
|
*
|
|
@@ -458,10 +458,6 @@ export class UniRpcRequest extends Message {
|
|
|
458
458
|
* @generated from field: string jsonrpc = 1;
|
|
459
459
|
*/
|
|
460
460
|
this.jsonrpc = "";
|
|
461
|
-
/**
|
|
462
|
-
* @generated from field: int32 id = 2;
|
|
463
|
-
*/
|
|
464
|
-
this.id = 0;
|
|
465
461
|
/**
|
|
466
462
|
* @generated from field: string method = 3;
|
|
467
463
|
*/
|
|
@@ -485,7 +481,7 @@ UniRpcRequest.runtime = proto3;
|
|
|
485
481
|
UniRpcRequest.typeName = "uniswap.unirpc.v2.UniRpcRequest";
|
|
486
482
|
UniRpcRequest.fields = proto3.util.newFieldList(() => [
|
|
487
483
|
{ no: 1, name: "jsonrpc", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
488
|
-
{ no: 2, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32
|
|
484
|
+
{ no: 2, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
489
485
|
{ no: 3, name: "method", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
490
486
|
{ no: 4, name: "params", kind: "message", T: Value },
|
|
491
487
|
]);
|
|
@@ -501,10 +497,6 @@ export class UniRpcResponse extends Message {
|
|
|
501
497
|
* @generated from field: string jsonrpc = 1;
|
|
502
498
|
*/
|
|
503
499
|
this.jsonrpc = "";
|
|
504
|
-
/**
|
|
505
|
-
* @generated from field: int32 id = 2;
|
|
506
|
-
*/
|
|
507
|
-
this.id = 0;
|
|
508
500
|
proto3.util.initPartial(data, this);
|
|
509
501
|
}
|
|
510
502
|
static fromBinary(bytes, options) {
|
|
@@ -524,7 +516,7 @@ UniRpcResponse.runtime = proto3;
|
|
|
524
516
|
UniRpcResponse.typeName = "uniswap.unirpc.v2.UniRpcResponse";
|
|
525
517
|
UniRpcResponse.fields = proto3.util.newFieldList(() => [
|
|
526
518
|
{ no: 1, name: "jsonrpc", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
527
|
-
{ no: 2, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32
|
|
519
|
+
{ no: 2, name: "id", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
528
520
|
{ no: 3, name: "result", kind: "message", T: Value },
|
|
529
521
|
{ no: 4, name: "error", kind: "message", T: UniRpcError },
|
|
530
522
|
{ no: 5, name: "stickyId", kind: "message", T: StringValue },
|