@sentio/protos 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.
- package/lib/builtin.d.ts +5 -0
- package/lib/builtin.js +3 -0
- package/lib/builtin.js.map +1 -0
- package/lib/chainquery/protos/chainquery.d.ts +399 -0
- package/lib/chainquery/protos/chainquery.js +941 -0
- package/lib/chainquery/protos/chainquery.js.map +1 -0
- package/lib/google/protobuf/empty.d.ts +15 -0
- package/lib/google/protobuf/empty.js +42 -0
- package/lib/google/protobuf/empty.js.map +1 -0
- package/lib/google/protobuf/struct.d.ts +72 -0
- package/lib/google/protobuf/struct.js +366 -0
- package/lib/google/protobuf/struct.js.map +1 -0
- package/lib/google/protobuf/timestamp.d.ts +17 -0
- package/lib/google/protobuf/timestamp.js +72 -0
- package/lib/google/protobuf/timestamp.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +20 -0
- package/lib/index.js.map +1 -0
- package/lib/processor/protos/processor.d.ts +825 -0
- package/lib/processor/protos/processor.js +3990 -0
- package/lib/processor/protos/processor.js.map +1 -0
- package/lib/service/price/protos/price.d.ts +84 -0
- package/lib/service/price/protos/price.js +260 -0
- package/lib/service/price/protos/price.js.map +1 -0
- package/package.json +22 -0
- package/processor.proto +433 -0
- package/src/builtin.ts +11 -0
- package/src/chainquery/protos/chainquery.ts +1181 -0
- package/src/google/protobuf/empty.ts +55 -0
- package/src/google/protobuf/struct.ts +420 -0
- package/src/google/protobuf/timestamp.ts +91 -0
- package/src/index.ts +5 -0
- package/src/processor/protos/processor.ts +4626 -0
- package/src/service/price/protos/price.ts +323 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { CallContext, CallOptions } from 'nice-grpc-common';
|
|
2
|
+
import _m0 from 'protobufjs/minimal';
|
|
3
|
+
export interface CoinID {
|
|
4
|
+
symbol?: string | undefined;
|
|
5
|
+
address?: CoinID_AddressIdentifier | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface CoinID_AddressIdentifier {
|
|
8
|
+
address: string;
|
|
9
|
+
chain: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GetPriceRequest {
|
|
12
|
+
timestamp: Date | undefined;
|
|
13
|
+
coinId: CoinID | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface GetPriceResponse {
|
|
16
|
+
price: number;
|
|
17
|
+
timestamp: Date | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare const CoinID: {
|
|
20
|
+
encode(message: CoinID, writer?: _m0.Writer): _m0.Writer;
|
|
21
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CoinID;
|
|
22
|
+
fromJSON(object: any): CoinID;
|
|
23
|
+
toJSON(message: CoinID): unknown;
|
|
24
|
+
fromPartial(object: DeepPartial<CoinID>): CoinID;
|
|
25
|
+
};
|
|
26
|
+
export declare const CoinID_AddressIdentifier: {
|
|
27
|
+
encode(message: CoinID_AddressIdentifier, writer?: _m0.Writer): _m0.Writer;
|
|
28
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CoinID_AddressIdentifier;
|
|
29
|
+
fromJSON(object: any): CoinID_AddressIdentifier;
|
|
30
|
+
toJSON(message: CoinID_AddressIdentifier): unknown;
|
|
31
|
+
fromPartial(object: DeepPartial<CoinID_AddressIdentifier>): CoinID_AddressIdentifier;
|
|
32
|
+
};
|
|
33
|
+
export declare const GetPriceRequest: {
|
|
34
|
+
encode(message: GetPriceRequest, writer?: _m0.Writer): _m0.Writer;
|
|
35
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceRequest;
|
|
36
|
+
fromJSON(object: any): GetPriceRequest;
|
|
37
|
+
toJSON(message: GetPriceRequest): unknown;
|
|
38
|
+
fromPartial(object: DeepPartial<GetPriceRequest>): GetPriceRequest;
|
|
39
|
+
};
|
|
40
|
+
export declare const GetPriceResponse: {
|
|
41
|
+
encode(message: GetPriceResponse, writer?: _m0.Writer): _m0.Writer;
|
|
42
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceResponse;
|
|
43
|
+
fromJSON(object: any): GetPriceResponse;
|
|
44
|
+
toJSON(message: GetPriceResponse): unknown;
|
|
45
|
+
fromPartial(object: DeepPartial<GetPriceResponse>): GetPriceResponse;
|
|
46
|
+
};
|
|
47
|
+
export declare type PriceServiceDefinition = typeof PriceServiceDefinition;
|
|
48
|
+
export declare const PriceServiceDefinition: {
|
|
49
|
+
readonly name: "PriceService";
|
|
50
|
+
readonly fullName: "price_service.PriceService";
|
|
51
|
+
readonly methods: {
|
|
52
|
+
readonly getPrice: {
|
|
53
|
+
readonly name: "GetPrice";
|
|
54
|
+
readonly requestType: {
|
|
55
|
+
encode(message: GetPriceRequest, writer?: _m0.Writer): _m0.Writer;
|
|
56
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceRequest;
|
|
57
|
+
fromJSON(object: any): GetPriceRequest;
|
|
58
|
+
toJSON(message: GetPriceRequest): unknown;
|
|
59
|
+
fromPartial(object: DeepPartial<GetPriceRequest>): GetPriceRequest;
|
|
60
|
+
};
|
|
61
|
+
readonly requestStream: false;
|
|
62
|
+
readonly responseType: {
|
|
63
|
+
encode(message: GetPriceResponse, writer?: _m0.Writer): _m0.Writer;
|
|
64
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceResponse;
|
|
65
|
+
fromJSON(object: any): GetPriceResponse;
|
|
66
|
+
toJSON(message: GetPriceResponse): unknown;
|
|
67
|
+
fromPartial(object: DeepPartial<GetPriceResponse>): GetPriceResponse;
|
|
68
|
+
};
|
|
69
|
+
readonly responseStream: false;
|
|
70
|
+
readonly options: {};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
export interface PriceServiceImplementation<CallContextExt = {}> {
|
|
75
|
+
getPrice(request: GetPriceRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetPriceResponse>>;
|
|
76
|
+
}
|
|
77
|
+
export interface PriceServiceClient<CallOptionsExt = {}> {
|
|
78
|
+
getPrice(request: DeepPartial<GetPriceRequest>, options?: CallOptions & CallOptionsExt): Promise<GetPriceResponse>;
|
|
79
|
+
}
|
|
80
|
+
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
81
|
+
declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
82
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
83
|
+
} : Partial<T>;
|
|
84
|
+
export {};
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PriceServiceDefinition = exports.GetPriceResponse = exports.GetPriceRequest = exports.CoinID_AddressIdentifier = exports.CoinID = void 0;
|
|
7
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
8
|
+
const timestamp_1 = require("../../../google/protobuf/timestamp");
|
|
9
|
+
function createBaseCoinID() {
|
|
10
|
+
return { symbol: undefined, address: undefined };
|
|
11
|
+
}
|
|
12
|
+
exports.CoinID = {
|
|
13
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
14
|
+
if (message.symbol !== undefined) {
|
|
15
|
+
writer.uint32(18).string(message.symbol);
|
|
16
|
+
}
|
|
17
|
+
if (message.address !== undefined) {
|
|
18
|
+
exports.CoinID_AddressIdentifier.encode(message.address, writer.uint32(26).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBaseCoinID();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 2:
|
|
30
|
+
message.symbol = reader.string();
|
|
31
|
+
break;
|
|
32
|
+
case 3:
|
|
33
|
+
message.address = exports.CoinID_AddressIdentifier.decode(reader, reader.uint32());
|
|
34
|
+
break;
|
|
35
|
+
default:
|
|
36
|
+
reader.skipType(tag & 7);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return message;
|
|
41
|
+
},
|
|
42
|
+
fromJSON(object) {
|
|
43
|
+
return {
|
|
44
|
+
symbol: isSet(object.symbol) ? String(object.symbol) : undefined,
|
|
45
|
+
address: isSet(object.address) ? exports.CoinID_AddressIdentifier.fromJSON(object.address) : undefined,
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
toJSON(message) {
|
|
49
|
+
const obj = {};
|
|
50
|
+
message.symbol !== undefined && (obj.symbol = message.symbol);
|
|
51
|
+
message.address !== undefined &&
|
|
52
|
+
(obj.address = message.address ? exports.CoinID_AddressIdentifier.toJSON(message.address) : undefined);
|
|
53
|
+
return obj;
|
|
54
|
+
},
|
|
55
|
+
fromPartial(object) {
|
|
56
|
+
const message = createBaseCoinID();
|
|
57
|
+
message.symbol = object.symbol ?? undefined;
|
|
58
|
+
message.address =
|
|
59
|
+
object.address !== undefined && object.address !== null
|
|
60
|
+
? exports.CoinID_AddressIdentifier.fromPartial(object.address)
|
|
61
|
+
: undefined;
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
function createBaseCoinID_AddressIdentifier() {
|
|
66
|
+
return { address: '', chain: '' };
|
|
67
|
+
}
|
|
68
|
+
exports.CoinID_AddressIdentifier = {
|
|
69
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
70
|
+
if (message.address !== '') {
|
|
71
|
+
writer.uint32(10).string(message.address);
|
|
72
|
+
}
|
|
73
|
+
if (message.chain !== '') {
|
|
74
|
+
writer.uint32(18).string(message.chain);
|
|
75
|
+
}
|
|
76
|
+
return writer;
|
|
77
|
+
},
|
|
78
|
+
decode(input, length) {
|
|
79
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
80
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
81
|
+
const message = createBaseCoinID_AddressIdentifier();
|
|
82
|
+
while (reader.pos < end) {
|
|
83
|
+
const tag = reader.uint32();
|
|
84
|
+
switch (tag >>> 3) {
|
|
85
|
+
case 1:
|
|
86
|
+
message.address = reader.string();
|
|
87
|
+
break;
|
|
88
|
+
case 2:
|
|
89
|
+
message.chain = reader.string();
|
|
90
|
+
break;
|
|
91
|
+
default:
|
|
92
|
+
reader.skipType(tag & 7);
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return message;
|
|
97
|
+
},
|
|
98
|
+
fromJSON(object) {
|
|
99
|
+
return {
|
|
100
|
+
address: isSet(object.address) ? String(object.address) : '',
|
|
101
|
+
chain: isSet(object.chain) ? String(object.chain) : '',
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
toJSON(message) {
|
|
105
|
+
const obj = {};
|
|
106
|
+
message.address !== undefined && (obj.address = message.address);
|
|
107
|
+
message.chain !== undefined && (obj.chain = message.chain);
|
|
108
|
+
return obj;
|
|
109
|
+
},
|
|
110
|
+
fromPartial(object) {
|
|
111
|
+
const message = createBaseCoinID_AddressIdentifier();
|
|
112
|
+
message.address = object.address ?? '';
|
|
113
|
+
message.chain = object.chain ?? '';
|
|
114
|
+
return message;
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
function createBaseGetPriceRequest() {
|
|
118
|
+
return { timestamp: undefined, coinId: undefined };
|
|
119
|
+
}
|
|
120
|
+
exports.GetPriceRequest = {
|
|
121
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
122
|
+
if (message.timestamp !== undefined) {
|
|
123
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).ldelim();
|
|
124
|
+
}
|
|
125
|
+
if (message.coinId !== undefined) {
|
|
126
|
+
exports.CoinID.encode(message.coinId, writer.uint32(18).fork()).ldelim();
|
|
127
|
+
}
|
|
128
|
+
return writer;
|
|
129
|
+
},
|
|
130
|
+
decode(input, length) {
|
|
131
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
132
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
133
|
+
const message = createBaseGetPriceRequest();
|
|
134
|
+
while (reader.pos < end) {
|
|
135
|
+
const tag = reader.uint32();
|
|
136
|
+
switch (tag >>> 3) {
|
|
137
|
+
case 1:
|
|
138
|
+
message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
139
|
+
break;
|
|
140
|
+
case 2:
|
|
141
|
+
message.coinId = exports.CoinID.decode(reader, reader.uint32());
|
|
142
|
+
break;
|
|
143
|
+
default:
|
|
144
|
+
reader.skipType(tag & 7);
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return message;
|
|
149
|
+
},
|
|
150
|
+
fromJSON(object) {
|
|
151
|
+
return {
|
|
152
|
+
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
153
|
+
coinId: isSet(object.coinId) ? exports.CoinID.fromJSON(object.coinId) : undefined,
|
|
154
|
+
};
|
|
155
|
+
},
|
|
156
|
+
toJSON(message) {
|
|
157
|
+
const obj = {};
|
|
158
|
+
message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
|
|
159
|
+
message.coinId !== undefined && (obj.coinId = message.coinId ? exports.CoinID.toJSON(message.coinId) : undefined);
|
|
160
|
+
return obj;
|
|
161
|
+
},
|
|
162
|
+
fromPartial(object) {
|
|
163
|
+
const message = createBaseGetPriceRequest();
|
|
164
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
165
|
+
message.coinId =
|
|
166
|
+
object.coinId !== undefined && object.coinId !== null ? exports.CoinID.fromPartial(object.coinId) : undefined;
|
|
167
|
+
return message;
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
function createBaseGetPriceResponse() {
|
|
171
|
+
return { price: 0, timestamp: undefined };
|
|
172
|
+
}
|
|
173
|
+
exports.GetPriceResponse = {
|
|
174
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
175
|
+
if (message.price !== 0) {
|
|
176
|
+
writer.uint32(9).double(message.price);
|
|
177
|
+
}
|
|
178
|
+
if (message.timestamp !== undefined) {
|
|
179
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim();
|
|
180
|
+
}
|
|
181
|
+
return writer;
|
|
182
|
+
},
|
|
183
|
+
decode(input, length) {
|
|
184
|
+
const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
|
|
185
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
186
|
+
const message = createBaseGetPriceResponse();
|
|
187
|
+
while (reader.pos < end) {
|
|
188
|
+
const tag = reader.uint32();
|
|
189
|
+
switch (tag >>> 3) {
|
|
190
|
+
case 1:
|
|
191
|
+
message.price = reader.double();
|
|
192
|
+
break;
|
|
193
|
+
case 2:
|
|
194
|
+
message.timestamp = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
195
|
+
break;
|
|
196
|
+
default:
|
|
197
|
+
reader.skipType(tag & 7);
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return message;
|
|
202
|
+
},
|
|
203
|
+
fromJSON(object) {
|
|
204
|
+
return {
|
|
205
|
+
price: isSet(object.price) ? Number(object.price) : 0,
|
|
206
|
+
timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
|
|
207
|
+
};
|
|
208
|
+
},
|
|
209
|
+
toJSON(message) {
|
|
210
|
+
const obj = {};
|
|
211
|
+
message.price !== undefined && (obj.price = message.price);
|
|
212
|
+
message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
|
|
213
|
+
return obj;
|
|
214
|
+
},
|
|
215
|
+
fromPartial(object) {
|
|
216
|
+
const message = createBaseGetPriceResponse();
|
|
217
|
+
message.price = object.price ?? 0;
|
|
218
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
219
|
+
return message;
|
|
220
|
+
},
|
|
221
|
+
};
|
|
222
|
+
exports.PriceServiceDefinition = {
|
|
223
|
+
name: 'PriceService',
|
|
224
|
+
fullName: 'price_service.PriceService',
|
|
225
|
+
methods: {
|
|
226
|
+
getPrice: {
|
|
227
|
+
name: 'GetPrice',
|
|
228
|
+
requestType: exports.GetPriceRequest,
|
|
229
|
+
requestStream: false,
|
|
230
|
+
responseType: exports.GetPriceResponse,
|
|
231
|
+
responseStream: false,
|
|
232
|
+
options: {},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
function toTimestamp(date) {
|
|
237
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
|
|
238
|
+
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
239
|
+
return { seconds, nanos };
|
|
240
|
+
}
|
|
241
|
+
function fromTimestamp(t) {
|
|
242
|
+
let millis = Number(t.seconds.toString()) * 1_000;
|
|
243
|
+
millis += t.nanos / 1_000_000;
|
|
244
|
+
return new Date(millis);
|
|
245
|
+
}
|
|
246
|
+
function fromJsonTimestamp(o) {
|
|
247
|
+
if (o instanceof Date) {
|
|
248
|
+
return o;
|
|
249
|
+
}
|
|
250
|
+
else if (typeof o === 'string') {
|
|
251
|
+
return new Date(o);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function isSet(value) {
|
|
258
|
+
return value !== null && value !== undefined;
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price.js","sourceRoot":"","sources":["../../../../src/service/price/protos/price.ts"],"names":[],"mappings":";;;;;;AAEA,iEAAoC;AACpC,kEAA8D;AAsB9D,SAAS,gBAAgB;IACvB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;AAClD,CAAC;AAEY,QAAA,MAAM,GAAG;IACpB,MAAM,CAAC,OAAe,EAAE,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,EAAE;QAC9D,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE;YAChC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;SACzC;QACD,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS,EAAE;YACjC,gCAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAA;SACpF;QACD,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,CAAC,KAA8B,EAAE,MAAe;QACpD,MAAM,MAAM,GAAG,KAAK,YAAY,iBAAG,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,iBAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QAC1E,IAAI,GAAG,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,GAAG,MAAM,CAAA;QACjE,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAA;QAClC,OAAO,MAAM,CAAC,GAAG,GAAG,GAAG,EAAE;YACvB,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,CAAA;YAC3B,QAAQ,GAAG,KAAK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,CAAA;KAC5C;AACH,CAAC;AAED,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAA;AAC9C,CAAC","sourcesContent":["/* eslint-disable */\nimport type { CallContext, CallOptions } from 'nice-grpc-common'\nimport _m0 from 'protobufjs/minimal'\nimport { Timestamp } from '../../../google/protobuf/timestamp'\n\nexport interface CoinID {\n symbol?: string | undefined\n address?: CoinID_AddressIdentifier | undefined\n}\n\nexport interface CoinID_AddressIdentifier {\n address: string\n chain: string\n}\n\nexport interface GetPriceRequest {\n timestamp: Date | undefined\n coinId: CoinID | undefined\n}\n\nexport interface GetPriceResponse {\n price: number\n timestamp: Date | undefined\n}\n\nfunction createBaseCoinID(): CoinID {\n return { symbol: undefined, address: undefined }\n}\n\nexport const CoinID = {\n encode(message: CoinID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.symbol !== undefined) {\n writer.uint32(18).string(message.symbol)\n }\n if (message.address !== undefined) {\n CoinID_AddressIdentifier.encode(message.address, writer.uint32(26).fork()).ldelim()\n }\n return writer\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): CoinID {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input)\n let end = length === undefined ? reader.len : reader.pos + length\n const message = createBaseCoinID()\n while (reader.pos < end) {\n const tag = reader.uint32()\n switch (tag >>> 3) {\n case 2:\n message.symbol = reader.string()\n break\n case 3:\n message.address = CoinID_AddressIdentifier.decode(reader, reader.uint32())\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n },\n\n fromJSON(object: any): CoinID {\n return {\n symbol: isSet(object.symbol) ? String(object.symbol) : undefined,\n address: isSet(object.address) ? CoinID_AddressIdentifier.fromJSON(object.address) : undefined,\n }\n },\n\n toJSON(message: CoinID): unknown {\n const obj: any = {}\n message.symbol !== undefined && (obj.symbol = message.symbol)\n message.address !== undefined &&\n (obj.address = message.address ? CoinID_AddressIdentifier.toJSON(message.address) : undefined)\n return obj\n },\n\n fromPartial(object: DeepPartial<CoinID>): CoinID {\n const message = createBaseCoinID()\n message.symbol = object.symbol ?? undefined\n message.address =\n object.address !== undefined && object.address !== null\n ? CoinID_AddressIdentifier.fromPartial(object.address)\n : undefined\n return message\n },\n}\n\nfunction createBaseCoinID_AddressIdentifier(): CoinID_AddressIdentifier {\n return { address: '', chain: '' }\n}\n\nexport const CoinID_AddressIdentifier = {\n encode(message: CoinID_AddressIdentifier, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.address !== '') {\n writer.uint32(10).string(message.address)\n }\n if (message.chain !== '') {\n writer.uint32(18).string(message.chain)\n }\n return writer\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): CoinID_AddressIdentifier {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input)\n let end = length === undefined ? reader.len : reader.pos + length\n const message = createBaseCoinID_AddressIdentifier()\n while (reader.pos < end) {\n const tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.address = reader.string()\n break\n case 2:\n message.chain = reader.string()\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n },\n\n fromJSON(object: any): CoinID_AddressIdentifier {\n return {\n address: isSet(object.address) ? String(object.address) : '',\n chain: isSet(object.chain) ? String(object.chain) : '',\n }\n },\n\n toJSON(message: CoinID_AddressIdentifier): unknown {\n const obj: any = {}\n message.address !== undefined && (obj.address = message.address)\n message.chain !== undefined && (obj.chain = message.chain)\n return obj\n },\n\n fromPartial(object: DeepPartial<CoinID_AddressIdentifier>): CoinID_AddressIdentifier {\n const message = createBaseCoinID_AddressIdentifier()\n message.address = object.address ?? ''\n message.chain = object.chain ?? ''\n return message\n },\n}\n\nfunction createBaseGetPriceRequest(): GetPriceRequest {\n return { timestamp: undefined, coinId: undefined }\n}\n\nexport const GetPriceRequest = {\n encode(message: GetPriceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.timestamp !== undefined) {\n Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(10).fork()).ldelim()\n }\n if (message.coinId !== undefined) {\n CoinID.encode(message.coinId, writer.uint32(18).fork()).ldelim()\n }\n return writer\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceRequest {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input)\n let end = length === undefined ? reader.len : reader.pos + length\n const message = createBaseGetPriceRequest()\n while (reader.pos < end) {\n const tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()))\n break\n case 2:\n message.coinId = CoinID.decode(reader, reader.uint32())\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n },\n\n fromJSON(object: any): GetPriceRequest {\n return {\n timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,\n coinId: isSet(object.coinId) ? CoinID.fromJSON(object.coinId) : undefined,\n }\n },\n\n toJSON(message: GetPriceRequest): unknown {\n const obj: any = {}\n message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString())\n message.coinId !== undefined && (obj.coinId = message.coinId ? CoinID.toJSON(message.coinId) : undefined)\n return obj\n },\n\n fromPartial(object: DeepPartial<GetPriceRequest>): GetPriceRequest {\n const message = createBaseGetPriceRequest()\n message.timestamp = object.timestamp ?? undefined\n message.coinId =\n object.coinId !== undefined && object.coinId !== null ? CoinID.fromPartial(object.coinId) : undefined\n return message\n },\n}\n\nfunction createBaseGetPriceResponse(): GetPriceResponse {\n return { price: 0, timestamp: undefined }\n}\n\nexport const GetPriceResponse = {\n encode(message: GetPriceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {\n if (message.price !== 0) {\n writer.uint32(9).double(message.price)\n }\n if (message.timestamp !== undefined) {\n Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim()\n }\n return writer\n },\n\n decode(input: _m0.Reader | Uint8Array, length?: number): GetPriceResponse {\n const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input)\n let end = length === undefined ? reader.len : reader.pos + length\n const message = createBaseGetPriceResponse()\n while (reader.pos < end) {\n const tag = reader.uint32()\n switch (tag >>> 3) {\n case 1:\n message.price = reader.double()\n break\n case 2:\n message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()))\n break\n default:\n reader.skipType(tag & 7)\n break\n }\n }\n return message\n },\n\n fromJSON(object: any): GetPriceResponse {\n return {\n price: isSet(object.price) ? Number(object.price) : 0,\n timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,\n }\n },\n\n toJSON(message: GetPriceResponse): unknown {\n const obj: any = {}\n message.price !== undefined && (obj.price = message.price)\n message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString())\n return obj\n },\n\n fromPartial(object: DeepPartial<GetPriceResponse>): GetPriceResponse {\n const message = createBaseGetPriceResponse()\n message.price = object.price ?? 0\n message.timestamp = object.timestamp ?? undefined\n return message\n },\n}\n\nexport type PriceServiceDefinition = typeof PriceServiceDefinition\nexport const PriceServiceDefinition = {\n name: 'PriceService',\n fullName: 'price_service.PriceService',\n methods: {\n getPrice: {\n name: 'GetPrice',\n requestType: GetPriceRequest,\n requestStream: false,\n responseType: GetPriceResponse,\n responseStream: false,\n options: {},\n },\n },\n} as const\n\nexport interface PriceServiceImplementation<CallContextExt = {}> {\n getPrice(request: GetPriceRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetPriceResponse>>\n}\n\nexport interface PriceServiceClient<CallOptionsExt = {}> {\n getPrice(request: DeepPartial<GetPriceRequest>, options?: CallOptions & CallOptionsExt): Promise<GetPriceResponse>\n}\n\ntype Builtin = Date | Function | Uint8Array | string | number | boolean | undefined\n\ntype DeepPartial<T> = T extends Builtin\n ? T\n : T extends Array<infer U>\n ? Array<DeepPartial<U>>\n : T extends ReadonlyArray<infer U>\n ? ReadonlyArray<DeepPartial<U>>\n : T extends {}\n ? { [K in keyof T]?: DeepPartial<T[K]> }\n : Partial<T>\n\nfunction toTimestamp(date: Date): Timestamp {\n const seconds = BigInt(Math.trunc(date.getTime() / 1_000))\n const nanos = (date.getTime() % 1_000) * 1_000_000\n return { seconds, nanos }\n}\n\nfunction fromTimestamp(t: Timestamp): Date {\n let millis = Number(t.seconds.toString()) * 1_000\n millis += t.nanos / 1_000_000\n return new Date(millis)\n}\n\nfunction fromJsonTimestamp(o: any): Date {\n if (o instanceof Date) {\n return o\n } else if (typeof o === 'string') {\n return new Date(o)\n } else {\n return fromTimestamp(Timestamp.fromJSON(o))\n }\n}\n\nfunction isSet(value: any): boolean {\n return value !== null && value !== undefined\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sentio/protos",
|
|
3
|
+
"license": "Apache-2.0",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"compile": "tsc -p .",
|
|
7
|
+
"clean": "tsc --build --clean",
|
|
8
|
+
"build": "yarn compile"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"google-protobuf": "^3.15.8",
|
|
12
|
+
"nice-grpc": "^2.0.0"
|
|
13
|
+
},
|
|
14
|
+
"main": "./lib/index.js",
|
|
15
|
+
"types": "./lib/index.d.ts",
|
|
16
|
+
"module": "./lib/index.js",
|
|
17
|
+
"files": [
|
|
18
|
+
"{lib,src}",
|
|
19
|
+
"!{lib,src}/tests",
|
|
20
|
+
"!**/*.test.{js,ts}"
|
|
21
|
+
]
|
|
22
|
+
}
|