@miradorlabs/web-grpc 1.0.0

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.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/google/protobuf/timestamp.ts +229 -0
  3. package/package.json +11 -0
  4. package/proto/gateway/common/v1/status.ts +179 -0
  5. package/proto/gateway/common/v1/status_grpc_pb.js +1 -0
  6. package/proto/gateway/common/v1/status_pb.js +237 -0
  7. package/proto/gateway/common/v1/types.ts +176 -0
  8. package/proto/gateway/common/v1/types_grpc_pb.js +1 -0
  9. package/proto/gateway/common/v1/types_pb.js +216 -0
  10. package/proto/gateway/web/v1/account_gateway.ts +7037 -0
  11. package/proto/gateway/web/v1/account_gateway_grpc_pb.js +813 -0
  12. package/proto/gateway/web/v1/account_gateway_pb.js +14338 -0
  13. package/proto/gateway/web/v1/automation_gateway.ts +5605 -0
  14. package/proto/gateway/web/v1/automation_gateway_grpc_pb.js +485 -0
  15. package/proto/gateway/web/v1/automation_gateway_pb.js +11618 -0
  16. package/proto/gateway/web/v1/chain_gateway.ts +3805 -0
  17. package/proto/gateway/web/v1/chain_gateway_grpc_pb.js +115 -0
  18. package/proto/gateway/web/v1/chain_gateway_pb.js +7049 -0
  19. package/proto/gateway/web/v1/market_gateway.ts +492 -0
  20. package/proto/gateway/web/v1/market_gateway_grpc_pb.js +45 -0
  21. package/proto/gateway/web/v1/market_gateway_pb.js +1063 -0
  22. package/proto/gateway/web/v1/oauth_gateway.ts +1163 -0
  23. package/proto/gateway/web/v1/oauth_gateway_grpc_pb.js +150 -0
  24. package/proto/gateway/web/v1/oauth_gateway_pb.js +2316 -0
  25. package/proto/gateway/web/v1/plan_gateway.ts +2463 -0
  26. package/proto/gateway/web/v1/plan_gateway_grpc_pb.js +152 -0
  27. package/proto/gateway/web/v1/plan_gateway_pb.js +4840 -0
  28. package/proto/gateway/web/v1/stream_gateway.ts +2354 -0
  29. package/proto/gateway/web/v1/stream_gateway_grpc_pb.js +145 -0
  30. package/proto/gateway/web/v1/stream_gateway_pb.js +4593 -0
  31. package/proto/gateway/web/v1/trace_gateway.ts +16320 -0
  32. package/proto/gateway/web/v1/trace_gateway_grpc_pb.js +280 -0
  33. package/proto/gateway/web/v1/trace_gateway_pb.js +28667 -0
@@ -0,0 +1,176 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v3.21.12
5
+ // source: proto/gateway/common/v1/types.proto
6
+
7
+ /* eslint-disable */
8
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
+
10
+ export const protobufPackage = "gateway.common.v1";
11
+
12
+ export enum BridgeLegType {
13
+ BRIDGE_LEG_TYPE_UNSPECIFIED = 0,
14
+ BRIDGE_LEG_TYPE_SOURCE = 1,
15
+ BRIDGE_LEG_TYPE_DESTINATION = 2,
16
+ UNRECOGNIZED = -1,
17
+ }
18
+
19
+ export function bridgeLegTypeFromJSON(object: any): BridgeLegType {
20
+ switch (object) {
21
+ case 0:
22
+ case "BRIDGE_LEG_TYPE_UNSPECIFIED":
23
+ return BridgeLegType.BRIDGE_LEG_TYPE_UNSPECIFIED;
24
+ case 1:
25
+ case "BRIDGE_LEG_TYPE_SOURCE":
26
+ return BridgeLegType.BRIDGE_LEG_TYPE_SOURCE;
27
+ case 2:
28
+ case "BRIDGE_LEG_TYPE_DESTINATION":
29
+ return BridgeLegType.BRIDGE_LEG_TYPE_DESTINATION;
30
+ case -1:
31
+ case "UNRECOGNIZED":
32
+ default:
33
+ return BridgeLegType.UNRECOGNIZED;
34
+ }
35
+ }
36
+
37
+ export function bridgeLegTypeToJSON(object: BridgeLegType): string {
38
+ switch (object) {
39
+ case BridgeLegType.BRIDGE_LEG_TYPE_UNSPECIFIED:
40
+ return "BRIDGE_LEG_TYPE_UNSPECIFIED";
41
+ case BridgeLegType.BRIDGE_LEG_TYPE_SOURCE:
42
+ return "BRIDGE_LEG_TYPE_SOURCE";
43
+ case BridgeLegType.BRIDGE_LEG_TYPE_DESTINATION:
44
+ return "BRIDGE_LEG_TYPE_DESTINATION";
45
+ case BridgeLegType.UNRECOGNIZED:
46
+ default:
47
+ return "UNRECOGNIZED";
48
+ }
49
+ }
50
+
51
+ export interface ChainDetails {
52
+ /** Human-readable chain name (e.g., "ethereum", "polygon") */
53
+ chainName: string;
54
+ /** EVM numeric chain ID (0 for non-EVM chains) */
55
+ evmChainId: number;
56
+ }
57
+
58
+ function createBaseChainDetails(): ChainDetails {
59
+ return { chainName: "", evmChainId: 0 };
60
+ }
61
+
62
+ export const ChainDetails: MessageFns<ChainDetails> = {
63
+ encode(message: ChainDetails, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
64
+ if (message.chainName !== "") {
65
+ writer.uint32(10).string(message.chainName);
66
+ }
67
+ if (message.evmChainId !== 0) {
68
+ writer.uint32(16).uint64(message.evmChainId);
69
+ }
70
+ return writer;
71
+ },
72
+
73
+ decode(input: BinaryReader | Uint8Array, length?: number): ChainDetails {
74
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
75
+ const end = length === undefined ? reader.len : reader.pos + length;
76
+ const message = createBaseChainDetails();
77
+ while (reader.pos < end) {
78
+ const tag = reader.uint32();
79
+ switch (tag >>> 3) {
80
+ case 1: {
81
+ if (tag !== 10) {
82
+ break;
83
+ }
84
+
85
+ message.chainName = reader.string();
86
+ continue;
87
+ }
88
+ case 2: {
89
+ if (tag !== 16) {
90
+ break;
91
+ }
92
+
93
+ message.evmChainId = longToNumber(reader.uint64());
94
+ continue;
95
+ }
96
+ }
97
+ if ((tag & 7) === 4 || tag === 0) {
98
+ break;
99
+ }
100
+ reader.skip(tag & 7);
101
+ }
102
+ return message;
103
+ },
104
+
105
+ fromJSON(object: any): ChainDetails {
106
+ return {
107
+ chainName: isSet(object.chainName)
108
+ ? globalThis.String(object.chainName)
109
+ : isSet(object.chain_name)
110
+ ? globalThis.String(object.chain_name)
111
+ : "",
112
+ evmChainId: isSet(object.evmChainId)
113
+ ? globalThis.Number(object.evmChainId)
114
+ : isSet(object.evm_chain_id)
115
+ ? globalThis.Number(object.evm_chain_id)
116
+ : 0,
117
+ };
118
+ },
119
+
120
+ toJSON(message: ChainDetails): unknown {
121
+ const obj: any = {};
122
+ if (message.chainName !== "") {
123
+ obj.chainName = message.chainName;
124
+ }
125
+ if (message.evmChainId !== 0) {
126
+ obj.evmChainId = Math.round(message.evmChainId);
127
+ }
128
+ return obj;
129
+ },
130
+
131
+ create<I extends Exact<DeepPartial<ChainDetails>, I>>(base?: I): ChainDetails {
132
+ return ChainDetails.fromPartial(base ?? ({} as any));
133
+ },
134
+ fromPartial<I extends Exact<DeepPartial<ChainDetails>, I>>(object: I): ChainDetails {
135
+ const message = createBaseChainDetails();
136
+ message.chainName = object.chainName ?? "";
137
+ message.evmChainId = object.evmChainId ?? 0;
138
+ return message;
139
+ },
140
+ };
141
+
142
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
143
+
144
+ export type DeepPartial<T> = T extends Builtin ? T
145
+ : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
146
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
147
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
148
+ : Partial<T>;
149
+
150
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
151
+ export type Exact<P, I extends P> = P extends Builtin ? P
152
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
153
+
154
+ function longToNumber(int64: { toString(): string }): number {
155
+ const num = globalThis.Number(int64.toString());
156
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
157
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
158
+ }
159
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
160
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
161
+ }
162
+ return num;
163
+ }
164
+
165
+ function isSet(value: any): boolean {
166
+ return value !== null && value !== undefined;
167
+ }
168
+
169
+ export interface MessageFns<T> {
170
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
171
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
172
+ fromJSON(object: any): T;
173
+ toJSON(message: T): unknown;
174
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
175
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
176
+ }
@@ -0,0 +1 @@
1
+ // GENERATED CODE -- NO SERVICES IN PROTO
@@ -0,0 +1,216 @@
1
+ // source: proto/gateway/common/v1/types.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ goog.exportSymbol('proto.gateway.common.v1.BridgeLegType', null, global);
25
+ goog.exportSymbol('proto.gateway.common.v1.ChainDetails', null, global);
26
+ /**
27
+ * Generated by JsPbCodeGenerator.
28
+ * @param {Array=} opt_data Optional initial data array, typically from a
29
+ * server response, or constructed directly in Javascript. The array is used
30
+ * in place and becomes part of the constructed object. It is not cloned.
31
+ * If no data is provided, the constructed object will be empty, but still
32
+ * valid.
33
+ * @extends {jspb.Message}
34
+ * @constructor
35
+ */
36
+ proto.gateway.common.v1.ChainDetails = function(opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38
+ };
39
+ goog.inherits(proto.gateway.common.v1.ChainDetails, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.gateway.common.v1.ChainDetails.displayName = 'proto.gateway.common.v1.ChainDetails';
46
+ }
47
+
48
+
49
+
50
+ if (jspb.Message.GENERATE_TO_OBJECT) {
51
+ /**
52
+ * Creates an object representation of this proto.
53
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
54
+ * Optional fields that are not set will be set to undefined.
55
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
56
+ * For the list of reserved names please see:
57
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
58
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
59
+ * JSPB instance for transitional soy proto support:
60
+ * http://goto/soy-param-migration
61
+ * @return {!Object}
62
+ */
63
+ proto.gateway.common.v1.ChainDetails.prototype.toObject = function(opt_includeInstance) {
64
+ return proto.gateway.common.v1.ChainDetails.toObject(opt_includeInstance, this);
65
+ };
66
+
67
+
68
+ /**
69
+ * Static version of the {@see toObject} method.
70
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
71
+ * the JSPB instance for transitional soy proto support:
72
+ * http://goto/soy-param-migration
73
+ * @param {!proto.gateway.common.v1.ChainDetails} msg The msg instance to transform.
74
+ * @return {!Object}
75
+ * @suppress {unusedLocalVariables} f is only used for nested messages
76
+ */
77
+ proto.gateway.common.v1.ChainDetails.toObject = function(includeInstance, msg) {
78
+ var f, obj = {
79
+ chainName: jspb.Message.getFieldWithDefault(msg, 1, ""),
80
+ evmChainId: jspb.Message.getFieldWithDefault(msg, 2, 0)
81
+ };
82
+
83
+ if (includeInstance) {
84
+ obj.$jspbMessageInstance = msg;
85
+ }
86
+ return obj;
87
+ };
88
+ }
89
+
90
+
91
+ /**
92
+ * Deserializes binary data (in protobuf wire format).
93
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
94
+ * @return {!proto.gateway.common.v1.ChainDetails}
95
+ */
96
+ proto.gateway.common.v1.ChainDetails.deserializeBinary = function(bytes) {
97
+ var reader = new jspb.BinaryReader(bytes);
98
+ var msg = new proto.gateway.common.v1.ChainDetails;
99
+ return proto.gateway.common.v1.ChainDetails.deserializeBinaryFromReader(msg, reader);
100
+ };
101
+
102
+
103
+ /**
104
+ * Deserializes binary data (in protobuf wire format) from the
105
+ * given reader into the given message object.
106
+ * @param {!proto.gateway.common.v1.ChainDetails} msg The message object to deserialize into.
107
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
108
+ * @return {!proto.gateway.common.v1.ChainDetails}
109
+ */
110
+ proto.gateway.common.v1.ChainDetails.deserializeBinaryFromReader = function(msg, reader) {
111
+ while (reader.nextField()) {
112
+ if (reader.isEndGroup()) {
113
+ break;
114
+ }
115
+ var field = reader.getFieldNumber();
116
+ switch (field) {
117
+ case 1:
118
+ var value = /** @type {string} */ (reader.readString());
119
+ msg.setChainName(value);
120
+ break;
121
+ case 2:
122
+ var value = /** @type {number} */ (reader.readUint64());
123
+ msg.setEvmChainId(value);
124
+ break;
125
+ default:
126
+ reader.skipField();
127
+ break;
128
+ }
129
+ }
130
+ return msg;
131
+ };
132
+
133
+
134
+ /**
135
+ * Serializes the message to binary data (in protobuf wire format).
136
+ * @return {!Uint8Array}
137
+ */
138
+ proto.gateway.common.v1.ChainDetails.prototype.serializeBinary = function() {
139
+ var writer = new jspb.BinaryWriter();
140
+ proto.gateway.common.v1.ChainDetails.serializeBinaryToWriter(this, writer);
141
+ return writer.getResultBuffer();
142
+ };
143
+
144
+
145
+ /**
146
+ * Serializes the given message to binary data (in protobuf wire
147
+ * format), writing to the given BinaryWriter.
148
+ * @param {!proto.gateway.common.v1.ChainDetails} message
149
+ * @param {!jspb.BinaryWriter} writer
150
+ * @suppress {unusedLocalVariables} f is only used for nested messages
151
+ */
152
+ proto.gateway.common.v1.ChainDetails.serializeBinaryToWriter = function(message, writer) {
153
+ var f = undefined;
154
+ f = message.getChainName();
155
+ if (f.length > 0) {
156
+ writer.writeString(
157
+ 1,
158
+ f
159
+ );
160
+ }
161
+ f = message.getEvmChainId();
162
+ if (f !== 0) {
163
+ writer.writeUint64(
164
+ 2,
165
+ f
166
+ );
167
+ }
168
+ };
169
+
170
+
171
+ /**
172
+ * optional string chain_name = 1;
173
+ * @return {string}
174
+ */
175
+ proto.gateway.common.v1.ChainDetails.prototype.getChainName = function() {
176
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
177
+ };
178
+
179
+
180
+ /**
181
+ * @param {string} value
182
+ * @return {!proto.gateway.common.v1.ChainDetails} returns this
183
+ */
184
+ proto.gateway.common.v1.ChainDetails.prototype.setChainName = function(value) {
185
+ return jspb.Message.setProto3StringField(this, 1, value);
186
+ };
187
+
188
+
189
+ /**
190
+ * optional uint64 evm_chain_id = 2;
191
+ * @return {number}
192
+ */
193
+ proto.gateway.common.v1.ChainDetails.prototype.getEvmChainId = function() {
194
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
195
+ };
196
+
197
+
198
+ /**
199
+ * @param {number} value
200
+ * @return {!proto.gateway.common.v1.ChainDetails} returns this
201
+ */
202
+ proto.gateway.common.v1.ChainDetails.prototype.setEvmChainId = function(value) {
203
+ return jspb.Message.setProto3IntField(this, 2, value);
204
+ };
205
+
206
+
207
+ /**
208
+ * @enum {number}
209
+ */
210
+ proto.gateway.common.v1.BridgeLegType = {
211
+ BRIDGE_LEG_TYPE_UNSPECIFIED: 0,
212
+ BRIDGE_LEG_TYPE_SOURCE: 1,
213
+ BRIDGE_LEG_TYPE_DESTINATION: 2
214
+ };
215
+
216
+ goog.object.extend(exports, proto.gateway.common.v1);