@avaprotocol/sdk-js 0.6.6 → 0.6.8
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/package.json +8 -3
- package/.env.example +0 -7
- package/grpc_codegen/avs.proto +0 -297
- package/grpc_codegen/avs.ts +0 -3720
- package/grpc_codegen/avs_grpc_pb.d.ts +0 -665
- package/grpc_codegen/avs_grpc_pb.js +0 -349
- package/grpc_codegen/avs_pb.d.ts +0 -958
- package/grpc_codegen/avs_pb.js +0 -7545
- package/jest.config.cjs +0 -21
- package/scripts/signMessage.js +0 -27
- package/src/__tests__/Client.e2e.test.ts +0 -172
- package/src/auth.js +0 -7
- package/src/auth.ts +0 -3
- package/src/config.js +0 -22
- package/src/config.ts +0 -27
- package/src/index.ts +0 -131
- package/src/rpc-client.ts +0 -7
- package/src/types.js +0 -2
- package/src/types.ts +0 -47
- package/tsconfig.json +0 -20
package/grpc_codegen/avs.ts
DELETED
|
@@ -1,3720 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.2.5
|
|
4
|
-
// protoc v3.19.1
|
|
5
|
-
// source: avs.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
import { map } from "rxjs/operators";
|
|
11
|
-
import { Timestamp } from "./google/protobuf/timestamp";
|
|
12
|
-
import { BoolValue } from "./google/protobuf/wrappers";
|
|
13
|
-
|
|
14
|
-
export const protobufPackage = "aggregator";
|
|
15
|
-
|
|
16
|
-
export enum TriggerType {
|
|
17
|
-
TimeTrigger = 0,
|
|
18
|
-
ContractQueryTrigger = 1,
|
|
19
|
-
ExpressionTrigger = 2,
|
|
20
|
-
UNRECOGNIZED = -1,
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function triggerTypeFromJSON(object: any): TriggerType {
|
|
24
|
-
switch (object) {
|
|
25
|
-
case 0:
|
|
26
|
-
case "TimeTrigger":
|
|
27
|
-
return TriggerType.TimeTrigger;
|
|
28
|
-
case 1:
|
|
29
|
-
case "ContractQueryTrigger":
|
|
30
|
-
return TriggerType.ContractQueryTrigger;
|
|
31
|
-
case 2:
|
|
32
|
-
case "ExpressionTrigger":
|
|
33
|
-
return TriggerType.ExpressionTrigger;
|
|
34
|
-
case -1:
|
|
35
|
-
case "UNRECOGNIZED":
|
|
36
|
-
default:
|
|
37
|
-
return TriggerType.UNRECOGNIZED;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export function triggerTypeToJSON(object: TriggerType): string {
|
|
42
|
-
switch (object) {
|
|
43
|
-
case TriggerType.TimeTrigger:
|
|
44
|
-
return "TimeTrigger";
|
|
45
|
-
case TriggerType.ContractQueryTrigger:
|
|
46
|
-
return "ContractQueryTrigger";
|
|
47
|
-
case TriggerType.ExpressionTrigger:
|
|
48
|
-
return "ExpressionTrigger";
|
|
49
|
-
case TriggerType.UNRECOGNIZED:
|
|
50
|
-
default:
|
|
51
|
-
return "UNRECOGNIZED";
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** TaskType represents what kind of work the task will perform */
|
|
56
|
-
export enum TaskType {
|
|
57
|
-
/** ETHTransferTask - Handle default/missing data */
|
|
58
|
-
ETHTransferTask = 0,
|
|
59
|
-
/**
|
|
60
|
-
* ContractExecutionTask - Generic contract execution which can be used for:
|
|
61
|
-
* ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc
|
|
62
|
-
* When executing a contract we need at least 2 things:
|
|
63
|
-
* - target contract address
|
|
64
|
-
* - the message to send to that contract
|
|
65
|
-
*/
|
|
66
|
-
ContractExecutionTask = 1,
|
|
67
|
-
GraphQLDataQueryTask = 2,
|
|
68
|
-
/** HTTPAPICallTask - Make call to a HTTP endpoint */
|
|
69
|
-
HTTPAPICallTask = 3,
|
|
70
|
-
/** CustomCodeTask - CustomCode allow to run arbitraty JavaScript. */
|
|
71
|
-
CustomCodeTask = 4,
|
|
72
|
-
BranchActionTask = 5,
|
|
73
|
-
UNRECOGNIZED = -1,
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function taskTypeFromJSON(object: any): TaskType {
|
|
77
|
-
switch (object) {
|
|
78
|
-
case 0:
|
|
79
|
-
case "ETHTransferTask":
|
|
80
|
-
return TaskType.ETHTransferTask;
|
|
81
|
-
case 1:
|
|
82
|
-
case "ContractExecutionTask":
|
|
83
|
-
return TaskType.ContractExecutionTask;
|
|
84
|
-
case 2:
|
|
85
|
-
case "GraphQLDataQueryTask":
|
|
86
|
-
return TaskType.GraphQLDataQueryTask;
|
|
87
|
-
case 3:
|
|
88
|
-
case "HTTPAPICallTask":
|
|
89
|
-
return TaskType.HTTPAPICallTask;
|
|
90
|
-
case 4:
|
|
91
|
-
case "CustomCodeTask":
|
|
92
|
-
return TaskType.CustomCodeTask;
|
|
93
|
-
case 5:
|
|
94
|
-
case "BranchActionTask":
|
|
95
|
-
return TaskType.BranchActionTask;
|
|
96
|
-
case -1:
|
|
97
|
-
case "UNRECOGNIZED":
|
|
98
|
-
default:
|
|
99
|
-
return TaskType.UNRECOGNIZED;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function taskTypeToJSON(object: TaskType): string {
|
|
104
|
-
switch (object) {
|
|
105
|
-
case TaskType.ETHTransferTask:
|
|
106
|
-
return "ETHTransferTask";
|
|
107
|
-
case TaskType.ContractExecutionTask:
|
|
108
|
-
return "ContractExecutionTask";
|
|
109
|
-
case TaskType.GraphQLDataQueryTask:
|
|
110
|
-
return "GraphQLDataQueryTask";
|
|
111
|
-
case TaskType.HTTPAPICallTask:
|
|
112
|
-
return "HTTPAPICallTask";
|
|
113
|
-
case TaskType.CustomCodeTask:
|
|
114
|
-
return "CustomCodeTask";
|
|
115
|
-
case TaskType.BranchActionTask:
|
|
116
|
-
return "BranchActionTask";
|
|
117
|
-
case TaskType.UNRECOGNIZED:
|
|
118
|
-
default:
|
|
119
|
-
return "UNRECOGNIZED";
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/** TaskStatus represents status of the task. The transition is as follow */
|
|
124
|
-
export enum TaskStatus {
|
|
125
|
-
Active = 0,
|
|
126
|
-
Completed = 1,
|
|
127
|
-
Failed = 2,
|
|
128
|
-
Canceled = 3,
|
|
129
|
-
Executing = 4,
|
|
130
|
-
UNRECOGNIZED = -1,
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function taskStatusFromJSON(object: any): TaskStatus {
|
|
134
|
-
switch (object) {
|
|
135
|
-
case 0:
|
|
136
|
-
case "Active":
|
|
137
|
-
return TaskStatus.Active;
|
|
138
|
-
case 1:
|
|
139
|
-
case "Completed":
|
|
140
|
-
return TaskStatus.Completed;
|
|
141
|
-
case 2:
|
|
142
|
-
case "Failed":
|
|
143
|
-
return TaskStatus.Failed;
|
|
144
|
-
case 3:
|
|
145
|
-
case "Canceled":
|
|
146
|
-
return TaskStatus.Canceled;
|
|
147
|
-
case 4:
|
|
148
|
-
case "Executing":
|
|
149
|
-
return TaskStatus.Executing;
|
|
150
|
-
case -1:
|
|
151
|
-
case "UNRECOGNIZED":
|
|
152
|
-
default:
|
|
153
|
-
return TaskStatus.UNRECOGNIZED;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export function taskStatusToJSON(object: TaskStatus): string {
|
|
158
|
-
switch (object) {
|
|
159
|
-
case TaskStatus.Active:
|
|
160
|
-
return "Active";
|
|
161
|
-
case TaskStatus.Completed:
|
|
162
|
-
return "Completed";
|
|
163
|
-
case TaskStatus.Failed:
|
|
164
|
-
return "Failed";
|
|
165
|
-
case TaskStatus.Canceled:
|
|
166
|
-
return "Canceled";
|
|
167
|
-
case TaskStatus.Executing:
|
|
168
|
-
return "Executing";
|
|
169
|
-
case TaskStatus.UNRECOGNIZED:
|
|
170
|
-
default:
|
|
171
|
-
return "UNRECOGNIZED";
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export enum CustomCodeType {
|
|
176
|
-
JavaScript = 0,
|
|
177
|
-
UNRECOGNIZED = -1,
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
export function customCodeTypeFromJSON(object: any): CustomCodeType {
|
|
181
|
-
switch (object) {
|
|
182
|
-
case 0:
|
|
183
|
-
case "JavaScript":
|
|
184
|
-
return CustomCodeType.JavaScript;
|
|
185
|
-
case -1:
|
|
186
|
-
case "UNRECOGNIZED":
|
|
187
|
-
default:
|
|
188
|
-
return CustomCodeType.UNRECOGNIZED;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export function customCodeTypeToJSON(object: CustomCodeType): string {
|
|
193
|
-
switch (object) {
|
|
194
|
-
case CustomCodeType.JavaScript:
|
|
195
|
-
return "JavaScript";
|
|
196
|
-
case CustomCodeType.UNRECOGNIZED:
|
|
197
|
-
default:
|
|
198
|
-
return "UNRECOGNIZED";
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export interface UUID {
|
|
203
|
-
bytes: string;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
export interface Checkin {
|
|
207
|
-
id: string;
|
|
208
|
-
address: string;
|
|
209
|
-
signature: string;
|
|
210
|
-
status: Checkin_Status | undefined;
|
|
211
|
-
version: string;
|
|
212
|
-
metricsPort: number;
|
|
213
|
-
remoteIP: string;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface Checkin_Status {
|
|
217
|
-
uptime: number;
|
|
218
|
-
queueDepth: number;
|
|
219
|
-
lastHeartbeat: Date | undefined;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
export interface CheckinResp {
|
|
223
|
-
updatedAt: Date | undefined;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export interface SyncTasksReq {
|
|
227
|
-
id: string;
|
|
228
|
-
address: string;
|
|
229
|
-
signature: string;
|
|
230
|
-
monotonicClock: number;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export interface TaskTrigger {
|
|
234
|
-
triggerType: TriggerType;
|
|
235
|
-
schedule: TimeCondition | undefined;
|
|
236
|
-
contractQuery: ContractQueryCondition | undefined;
|
|
237
|
-
expression: ExpressionCondition | undefined;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/** Simple timebase or cron syntax. */
|
|
241
|
-
export interface TimeCondition {
|
|
242
|
-
fixed: number[];
|
|
243
|
-
cron: string;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* A contract method that return true/false
|
|
248
|
-
* Ideally to use when we already have an existing contract that perform the
|
|
249
|
-
* check.
|
|
250
|
-
* This method will be evaluate every block
|
|
251
|
-
*/
|
|
252
|
-
export interface ContractQueryCondition {
|
|
253
|
-
contractAddress: string;
|
|
254
|
-
callmsg: string;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* An arbitrary expression to express the condition.
|
|
259
|
-
* People can define condition example
|
|
260
|
-
* chainlinkPrice("address-of-eth-usd-pair") > 2644500 && queryContract("contractaddress", "callmsg")[2] < = 5
|
|
261
|
-
* By allow arbitrary expression, people can mix and match to create conplex
|
|
262
|
-
* condition that match their workload
|
|
263
|
-
*
|
|
264
|
-
* The function to be used need to be pre-defined on our task egnine runtime.
|
|
265
|
-
* When a new block is build, our engine will execute these check
|
|
266
|
-
*
|
|
267
|
-
* The expression language is re-present by https://expr-lang.org/
|
|
268
|
-
*/
|
|
269
|
-
export interface ExpressionCondition {
|
|
270
|
-
expression: string;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export interface SyncTasksResp {
|
|
274
|
-
id: string;
|
|
275
|
-
checkType: string;
|
|
276
|
-
trigger: TaskTrigger | undefined;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
export interface ETHTransfer {
|
|
280
|
-
destination: string;
|
|
281
|
-
amount: string;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export interface ContractExecution {
|
|
285
|
-
contractAddress: string;
|
|
286
|
-
callData: string;
|
|
287
|
-
method: string;
|
|
288
|
-
encodedParams: string;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export interface GraphQLDataQuery {
|
|
292
|
-
/** TODO: support graphql variable */
|
|
293
|
-
url: string;
|
|
294
|
-
query: string;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
export interface HTTPAPICall {
|
|
298
|
-
url: string;
|
|
299
|
-
headers: { [key: string]: string };
|
|
300
|
-
body: string;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
export interface HTTPAPICall_HeadersEntry {
|
|
304
|
-
key: string;
|
|
305
|
-
value: string;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
export interface CustomCode {
|
|
309
|
-
type: CustomCodeType;
|
|
310
|
-
body: string;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
export interface ConditionJump {
|
|
314
|
-
expression: string;
|
|
315
|
-
next: string;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
export interface BranchAction {
|
|
319
|
-
If: ConditionJump | undefined;
|
|
320
|
-
ElseIfs: ConditionJump[];
|
|
321
|
-
Else: ConditionJump | undefined;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
export interface TaskAction {
|
|
325
|
-
taskType: TaskType;
|
|
326
|
-
id: string;
|
|
327
|
-
name: string;
|
|
328
|
-
/**
|
|
329
|
-
* Next can be empty. In some kind of block, such as branching, the next is
|
|
330
|
-
* based on branching condition
|
|
331
|
-
*/
|
|
332
|
-
next: string[];
|
|
333
|
-
/** Transfer eth */
|
|
334
|
-
ethTransfer:
|
|
335
|
-
| ETHTransfer
|
|
336
|
-
| undefined;
|
|
337
|
-
/**
|
|
338
|
-
* Run one ore more contracts. The call call also be batched with tool like
|
|
339
|
-
* multicall to wrap many calls
|
|
340
|
-
*/
|
|
341
|
-
contractExecution:
|
|
342
|
-
| ContractExecution
|
|
343
|
-
| undefined;
|
|
344
|
-
/** Make call to a graphql endpoint */
|
|
345
|
-
graphqlDataQuery:
|
|
346
|
-
| GraphQLDataQuery
|
|
347
|
-
| undefined;
|
|
348
|
-
/** Make call to a HTTP endpoint */
|
|
349
|
-
httpDataQuery:
|
|
350
|
-
| HTTPAPICall
|
|
351
|
-
| undefined;
|
|
352
|
-
/** CustomCode allow to run arbitraty JavaScript. */
|
|
353
|
-
customCode: CustomCode | undefined;
|
|
354
|
-
branch: BranchAction | undefined;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
export interface Execution {
|
|
358
|
-
epoch: number;
|
|
359
|
-
userOpHash: string;
|
|
360
|
-
error: string;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
export interface Task {
|
|
364
|
-
id: UUID | undefined;
|
|
365
|
-
owner: string;
|
|
366
|
-
smartAccountAddress: string;
|
|
367
|
-
trigger: TaskTrigger | undefined;
|
|
368
|
-
nodes: TaskAction[];
|
|
369
|
-
/** task won't be check before this */
|
|
370
|
-
startAt: number;
|
|
371
|
-
/** task won't be run/check after this */
|
|
372
|
-
expiredAt: number;
|
|
373
|
-
/** arbitrary data about this task */
|
|
374
|
-
memo: string;
|
|
375
|
-
completedAt: number;
|
|
376
|
-
status: TaskStatus;
|
|
377
|
-
/** repeatable means a task can continue to run even after the first execution */
|
|
378
|
-
repeatable: boolean;
|
|
379
|
-
executions: Execution[];
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
export interface CreateTaskReq {
|
|
383
|
-
trigger: TaskTrigger | undefined;
|
|
384
|
-
actions: TaskAction[];
|
|
385
|
-
startAt: number;
|
|
386
|
-
expiredAt: number;
|
|
387
|
-
memo: string;
|
|
388
|
-
/** A repeatable task will continue to be run */
|
|
389
|
-
repeatable: boolean;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export interface CreateTaskResp {
|
|
393
|
-
id: string;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
export interface NonceRequest {
|
|
397
|
-
owner: string;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
export interface NonceResp {
|
|
401
|
-
nonce: string;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
export interface AddressRequest {
|
|
405
|
-
owner: string;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
export interface AddressResp {
|
|
409
|
-
smartAccountAddress: string;
|
|
410
|
-
nonce: string;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
export interface ListTasksReq {
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
export interface ListTasksResp {
|
|
417
|
-
tasks: ListTasksResp_TaskItemResp[];
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
export interface ListTasksResp_TaskItemResp {
|
|
421
|
-
id: string;
|
|
422
|
-
status: TaskStatus;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
export interface GetKeyReq {
|
|
426
|
-
owner: string;
|
|
427
|
-
expiredAt: number;
|
|
428
|
-
signature: string;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
export interface KeyResp {
|
|
432
|
-
key: string;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
export interface UpdateChecksReq {
|
|
436
|
-
address: string;
|
|
437
|
-
signature: string;
|
|
438
|
-
id: string[];
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
export interface UpdateChecksResp {
|
|
442
|
-
updatedAt: Date | undefined;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
function createBaseUUID(): UUID {
|
|
446
|
-
return { bytes: "" };
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
export const UUID: MessageFns<UUID> = {
|
|
450
|
-
encode(message: UUID, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
451
|
-
if (message.bytes !== "") {
|
|
452
|
-
writer.uint32(10).string(message.bytes);
|
|
453
|
-
}
|
|
454
|
-
return writer;
|
|
455
|
-
},
|
|
456
|
-
|
|
457
|
-
decode(input: BinaryReader | Uint8Array, length?: number): UUID {
|
|
458
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
459
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
460
|
-
const message = createBaseUUID();
|
|
461
|
-
while (reader.pos < end) {
|
|
462
|
-
const tag = reader.uint32();
|
|
463
|
-
switch (tag >>> 3) {
|
|
464
|
-
case 1: {
|
|
465
|
-
if (tag !== 10) {
|
|
466
|
-
break;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
message.bytes = reader.string();
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
474
|
-
break;
|
|
475
|
-
}
|
|
476
|
-
reader.skip(tag & 7);
|
|
477
|
-
}
|
|
478
|
-
return message;
|
|
479
|
-
},
|
|
480
|
-
|
|
481
|
-
fromJSON(object: any): UUID {
|
|
482
|
-
return { bytes: isSet(object.bytes) ? globalThis.String(object.bytes) : "" };
|
|
483
|
-
},
|
|
484
|
-
|
|
485
|
-
toJSON(message: UUID): unknown {
|
|
486
|
-
const obj: any = {};
|
|
487
|
-
if (message.bytes !== "") {
|
|
488
|
-
obj.bytes = message.bytes;
|
|
489
|
-
}
|
|
490
|
-
return obj;
|
|
491
|
-
},
|
|
492
|
-
|
|
493
|
-
create<I extends Exact<DeepPartial<UUID>, I>>(base?: I): UUID {
|
|
494
|
-
return UUID.fromPartial(base ?? ({} as any));
|
|
495
|
-
},
|
|
496
|
-
fromPartial<I extends Exact<DeepPartial<UUID>, I>>(object: I): UUID {
|
|
497
|
-
const message = createBaseUUID();
|
|
498
|
-
message.bytes = object.bytes ?? "";
|
|
499
|
-
return message;
|
|
500
|
-
},
|
|
501
|
-
};
|
|
502
|
-
|
|
503
|
-
function createBaseCheckin(): Checkin {
|
|
504
|
-
return { id: "", address: "", signature: "", status: undefined, version: "", metricsPort: 0, remoteIP: "" };
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
export const Checkin: MessageFns<Checkin> = {
|
|
508
|
-
encode(message: Checkin, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
509
|
-
if (message.id !== "") {
|
|
510
|
-
writer.uint32(10).string(message.id);
|
|
511
|
-
}
|
|
512
|
-
if (message.address !== "") {
|
|
513
|
-
writer.uint32(18).string(message.address);
|
|
514
|
-
}
|
|
515
|
-
if (message.signature !== "") {
|
|
516
|
-
writer.uint32(26).string(message.signature);
|
|
517
|
-
}
|
|
518
|
-
if (message.status !== undefined) {
|
|
519
|
-
Checkin_Status.encode(message.status, writer.uint32(34).fork()).join();
|
|
520
|
-
}
|
|
521
|
-
if (message.version !== "") {
|
|
522
|
-
writer.uint32(42).string(message.version);
|
|
523
|
-
}
|
|
524
|
-
if (message.metricsPort !== 0) {
|
|
525
|
-
writer.uint32(48).int32(message.metricsPort);
|
|
526
|
-
}
|
|
527
|
-
if (message.remoteIP !== "") {
|
|
528
|
-
writer.uint32(58).string(message.remoteIP);
|
|
529
|
-
}
|
|
530
|
-
return writer;
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Checkin {
|
|
534
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
535
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
536
|
-
const message = createBaseCheckin();
|
|
537
|
-
while (reader.pos < end) {
|
|
538
|
-
const tag = reader.uint32();
|
|
539
|
-
switch (tag >>> 3) {
|
|
540
|
-
case 1: {
|
|
541
|
-
if (tag !== 10) {
|
|
542
|
-
break;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
message.id = reader.string();
|
|
546
|
-
continue;
|
|
547
|
-
}
|
|
548
|
-
case 2: {
|
|
549
|
-
if (tag !== 18) {
|
|
550
|
-
break;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
message.address = reader.string();
|
|
554
|
-
continue;
|
|
555
|
-
}
|
|
556
|
-
case 3: {
|
|
557
|
-
if (tag !== 26) {
|
|
558
|
-
break;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
message.signature = reader.string();
|
|
562
|
-
continue;
|
|
563
|
-
}
|
|
564
|
-
case 4: {
|
|
565
|
-
if (tag !== 34) {
|
|
566
|
-
break;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
message.status = Checkin_Status.decode(reader, reader.uint32());
|
|
570
|
-
continue;
|
|
571
|
-
}
|
|
572
|
-
case 5: {
|
|
573
|
-
if (tag !== 42) {
|
|
574
|
-
break;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
message.version = reader.string();
|
|
578
|
-
continue;
|
|
579
|
-
}
|
|
580
|
-
case 6: {
|
|
581
|
-
if (tag !== 48) {
|
|
582
|
-
break;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
message.metricsPort = reader.int32();
|
|
586
|
-
continue;
|
|
587
|
-
}
|
|
588
|
-
case 7: {
|
|
589
|
-
if (tag !== 58) {
|
|
590
|
-
break;
|
|
591
|
-
}
|
|
592
|
-
|
|
593
|
-
message.remoteIP = reader.string();
|
|
594
|
-
continue;
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
598
|
-
break;
|
|
599
|
-
}
|
|
600
|
-
reader.skip(tag & 7);
|
|
601
|
-
}
|
|
602
|
-
return message;
|
|
603
|
-
},
|
|
604
|
-
|
|
605
|
-
fromJSON(object: any): Checkin {
|
|
606
|
-
return {
|
|
607
|
-
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
608
|
-
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
609
|
-
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
610
|
-
status: isSet(object.status) ? Checkin_Status.fromJSON(object.status) : undefined,
|
|
611
|
-
version: isSet(object.version) ? globalThis.String(object.version) : "",
|
|
612
|
-
metricsPort: isSet(object.metricsPort) ? globalThis.Number(object.metricsPort) : 0,
|
|
613
|
-
remoteIP: isSet(object.remoteIP) ? globalThis.String(object.remoteIP) : "",
|
|
614
|
-
};
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
toJSON(message: Checkin): unknown {
|
|
618
|
-
const obj: any = {};
|
|
619
|
-
if (message.id !== "") {
|
|
620
|
-
obj.id = message.id;
|
|
621
|
-
}
|
|
622
|
-
if (message.address !== "") {
|
|
623
|
-
obj.address = message.address;
|
|
624
|
-
}
|
|
625
|
-
if (message.signature !== "") {
|
|
626
|
-
obj.signature = message.signature;
|
|
627
|
-
}
|
|
628
|
-
if (message.status !== undefined) {
|
|
629
|
-
obj.status = Checkin_Status.toJSON(message.status);
|
|
630
|
-
}
|
|
631
|
-
if (message.version !== "") {
|
|
632
|
-
obj.version = message.version;
|
|
633
|
-
}
|
|
634
|
-
if (message.metricsPort !== 0) {
|
|
635
|
-
obj.metricsPort = Math.round(message.metricsPort);
|
|
636
|
-
}
|
|
637
|
-
if (message.remoteIP !== "") {
|
|
638
|
-
obj.remoteIP = message.remoteIP;
|
|
639
|
-
}
|
|
640
|
-
return obj;
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
create<I extends Exact<DeepPartial<Checkin>, I>>(base?: I): Checkin {
|
|
644
|
-
return Checkin.fromPartial(base ?? ({} as any));
|
|
645
|
-
},
|
|
646
|
-
fromPartial<I extends Exact<DeepPartial<Checkin>, I>>(object: I): Checkin {
|
|
647
|
-
const message = createBaseCheckin();
|
|
648
|
-
message.id = object.id ?? "";
|
|
649
|
-
message.address = object.address ?? "";
|
|
650
|
-
message.signature = object.signature ?? "";
|
|
651
|
-
message.status = (object.status !== undefined && object.status !== null)
|
|
652
|
-
? Checkin_Status.fromPartial(object.status)
|
|
653
|
-
: undefined;
|
|
654
|
-
message.version = object.version ?? "";
|
|
655
|
-
message.metricsPort = object.metricsPort ?? 0;
|
|
656
|
-
message.remoteIP = object.remoteIP ?? "";
|
|
657
|
-
return message;
|
|
658
|
-
},
|
|
659
|
-
};
|
|
660
|
-
|
|
661
|
-
function createBaseCheckin_Status(): Checkin_Status {
|
|
662
|
-
return { uptime: 0, queueDepth: 0, lastHeartbeat: undefined };
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
export const Checkin_Status: MessageFns<Checkin_Status> = {
|
|
666
|
-
encode(message: Checkin_Status, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
667
|
-
if (message.uptime !== 0) {
|
|
668
|
-
writer.uint32(8).int64(message.uptime);
|
|
669
|
-
}
|
|
670
|
-
if (message.queueDepth !== 0) {
|
|
671
|
-
writer.uint32(16).int64(message.queueDepth);
|
|
672
|
-
}
|
|
673
|
-
if (message.lastHeartbeat !== undefined) {
|
|
674
|
-
Timestamp.encode(toTimestamp(message.lastHeartbeat), writer.uint32(26).fork()).join();
|
|
675
|
-
}
|
|
676
|
-
return writer;
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Checkin_Status {
|
|
680
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
681
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
682
|
-
const message = createBaseCheckin_Status();
|
|
683
|
-
while (reader.pos < end) {
|
|
684
|
-
const tag = reader.uint32();
|
|
685
|
-
switch (tag >>> 3) {
|
|
686
|
-
case 1: {
|
|
687
|
-
if (tag !== 8) {
|
|
688
|
-
break;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
message.uptime = longToNumber(reader.int64());
|
|
692
|
-
continue;
|
|
693
|
-
}
|
|
694
|
-
case 2: {
|
|
695
|
-
if (tag !== 16) {
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
message.queueDepth = longToNumber(reader.int64());
|
|
700
|
-
continue;
|
|
701
|
-
}
|
|
702
|
-
case 3: {
|
|
703
|
-
if (tag !== 26) {
|
|
704
|
-
break;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
message.lastHeartbeat = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
708
|
-
continue;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
712
|
-
break;
|
|
713
|
-
}
|
|
714
|
-
reader.skip(tag & 7);
|
|
715
|
-
}
|
|
716
|
-
return message;
|
|
717
|
-
},
|
|
718
|
-
|
|
719
|
-
fromJSON(object: any): Checkin_Status {
|
|
720
|
-
return {
|
|
721
|
-
uptime: isSet(object.uptime) ? globalThis.Number(object.uptime) : 0,
|
|
722
|
-
queueDepth: isSet(object.queueDepth) ? globalThis.Number(object.queueDepth) : 0,
|
|
723
|
-
lastHeartbeat: isSet(object.lastHeartbeat) ? fromJsonTimestamp(object.lastHeartbeat) : undefined,
|
|
724
|
-
};
|
|
725
|
-
},
|
|
726
|
-
|
|
727
|
-
toJSON(message: Checkin_Status): unknown {
|
|
728
|
-
const obj: any = {};
|
|
729
|
-
if (message.uptime !== 0) {
|
|
730
|
-
obj.uptime = Math.round(message.uptime);
|
|
731
|
-
}
|
|
732
|
-
if (message.queueDepth !== 0) {
|
|
733
|
-
obj.queueDepth = Math.round(message.queueDepth);
|
|
734
|
-
}
|
|
735
|
-
if (message.lastHeartbeat !== undefined) {
|
|
736
|
-
obj.lastHeartbeat = message.lastHeartbeat.toISOString();
|
|
737
|
-
}
|
|
738
|
-
return obj;
|
|
739
|
-
},
|
|
740
|
-
|
|
741
|
-
create<I extends Exact<DeepPartial<Checkin_Status>, I>>(base?: I): Checkin_Status {
|
|
742
|
-
return Checkin_Status.fromPartial(base ?? ({} as any));
|
|
743
|
-
},
|
|
744
|
-
fromPartial<I extends Exact<DeepPartial<Checkin_Status>, I>>(object: I): Checkin_Status {
|
|
745
|
-
const message = createBaseCheckin_Status();
|
|
746
|
-
message.uptime = object.uptime ?? 0;
|
|
747
|
-
message.queueDepth = object.queueDepth ?? 0;
|
|
748
|
-
message.lastHeartbeat = object.lastHeartbeat ?? undefined;
|
|
749
|
-
return message;
|
|
750
|
-
},
|
|
751
|
-
};
|
|
752
|
-
|
|
753
|
-
function createBaseCheckinResp(): CheckinResp {
|
|
754
|
-
return { updatedAt: undefined };
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
export const CheckinResp: MessageFns<CheckinResp> = {
|
|
758
|
-
encode(message: CheckinResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
759
|
-
if (message.updatedAt !== undefined) {
|
|
760
|
-
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(10).fork()).join();
|
|
761
|
-
}
|
|
762
|
-
return writer;
|
|
763
|
-
},
|
|
764
|
-
|
|
765
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CheckinResp {
|
|
766
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
767
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
768
|
-
const message = createBaseCheckinResp();
|
|
769
|
-
while (reader.pos < end) {
|
|
770
|
-
const tag = reader.uint32();
|
|
771
|
-
switch (tag >>> 3) {
|
|
772
|
-
case 1: {
|
|
773
|
-
if (tag !== 10) {
|
|
774
|
-
break;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
778
|
-
continue;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
782
|
-
break;
|
|
783
|
-
}
|
|
784
|
-
reader.skip(tag & 7);
|
|
785
|
-
}
|
|
786
|
-
return message;
|
|
787
|
-
},
|
|
788
|
-
|
|
789
|
-
fromJSON(object: any): CheckinResp {
|
|
790
|
-
return { updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined };
|
|
791
|
-
},
|
|
792
|
-
|
|
793
|
-
toJSON(message: CheckinResp): unknown {
|
|
794
|
-
const obj: any = {};
|
|
795
|
-
if (message.updatedAt !== undefined) {
|
|
796
|
-
obj.updatedAt = message.updatedAt.toISOString();
|
|
797
|
-
}
|
|
798
|
-
return obj;
|
|
799
|
-
},
|
|
800
|
-
|
|
801
|
-
create<I extends Exact<DeepPartial<CheckinResp>, I>>(base?: I): CheckinResp {
|
|
802
|
-
return CheckinResp.fromPartial(base ?? ({} as any));
|
|
803
|
-
},
|
|
804
|
-
fromPartial<I extends Exact<DeepPartial<CheckinResp>, I>>(object: I): CheckinResp {
|
|
805
|
-
const message = createBaseCheckinResp();
|
|
806
|
-
message.updatedAt = object.updatedAt ?? undefined;
|
|
807
|
-
return message;
|
|
808
|
-
},
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
function createBaseSyncTasksReq(): SyncTasksReq {
|
|
812
|
-
return { id: "", address: "", signature: "", monotonicClock: 0 };
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
export const SyncTasksReq: MessageFns<SyncTasksReq> = {
|
|
816
|
-
encode(message: SyncTasksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
817
|
-
if (message.id !== "") {
|
|
818
|
-
writer.uint32(10).string(message.id);
|
|
819
|
-
}
|
|
820
|
-
if (message.address !== "") {
|
|
821
|
-
writer.uint32(18).string(message.address);
|
|
822
|
-
}
|
|
823
|
-
if (message.signature !== "") {
|
|
824
|
-
writer.uint32(26).string(message.signature);
|
|
825
|
-
}
|
|
826
|
-
if (message.monotonicClock !== 0) {
|
|
827
|
-
writer.uint32(32).int64(message.monotonicClock);
|
|
828
|
-
}
|
|
829
|
-
return writer;
|
|
830
|
-
},
|
|
831
|
-
|
|
832
|
-
decode(input: BinaryReader | Uint8Array, length?: number): SyncTasksReq {
|
|
833
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
834
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
835
|
-
const message = createBaseSyncTasksReq();
|
|
836
|
-
while (reader.pos < end) {
|
|
837
|
-
const tag = reader.uint32();
|
|
838
|
-
switch (tag >>> 3) {
|
|
839
|
-
case 1: {
|
|
840
|
-
if (tag !== 10) {
|
|
841
|
-
break;
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
message.id = reader.string();
|
|
845
|
-
continue;
|
|
846
|
-
}
|
|
847
|
-
case 2: {
|
|
848
|
-
if (tag !== 18) {
|
|
849
|
-
break;
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
message.address = reader.string();
|
|
853
|
-
continue;
|
|
854
|
-
}
|
|
855
|
-
case 3: {
|
|
856
|
-
if (tag !== 26) {
|
|
857
|
-
break;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
message.signature = reader.string();
|
|
861
|
-
continue;
|
|
862
|
-
}
|
|
863
|
-
case 4: {
|
|
864
|
-
if (tag !== 32) {
|
|
865
|
-
break;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
message.monotonicClock = longToNumber(reader.int64());
|
|
869
|
-
continue;
|
|
870
|
-
}
|
|
871
|
-
}
|
|
872
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
873
|
-
break;
|
|
874
|
-
}
|
|
875
|
-
reader.skip(tag & 7);
|
|
876
|
-
}
|
|
877
|
-
return message;
|
|
878
|
-
},
|
|
879
|
-
|
|
880
|
-
fromJSON(object: any): SyncTasksReq {
|
|
881
|
-
return {
|
|
882
|
-
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
883
|
-
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
884
|
-
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
885
|
-
monotonicClock: isSet(object.monotonicClock) ? globalThis.Number(object.monotonicClock) : 0,
|
|
886
|
-
};
|
|
887
|
-
},
|
|
888
|
-
|
|
889
|
-
toJSON(message: SyncTasksReq): unknown {
|
|
890
|
-
const obj: any = {};
|
|
891
|
-
if (message.id !== "") {
|
|
892
|
-
obj.id = message.id;
|
|
893
|
-
}
|
|
894
|
-
if (message.address !== "") {
|
|
895
|
-
obj.address = message.address;
|
|
896
|
-
}
|
|
897
|
-
if (message.signature !== "") {
|
|
898
|
-
obj.signature = message.signature;
|
|
899
|
-
}
|
|
900
|
-
if (message.monotonicClock !== 0) {
|
|
901
|
-
obj.monotonicClock = Math.round(message.monotonicClock);
|
|
902
|
-
}
|
|
903
|
-
return obj;
|
|
904
|
-
},
|
|
905
|
-
|
|
906
|
-
create<I extends Exact<DeepPartial<SyncTasksReq>, I>>(base?: I): SyncTasksReq {
|
|
907
|
-
return SyncTasksReq.fromPartial(base ?? ({} as any));
|
|
908
|
-
},
|
|
909
|
-
fromPartial<I extends Exact<DeepPartial<SyncTasksReq>, I>>(object: I): SyncTasksReq {
|
|
910
|
-
const message = createBaseSyncTasksReq();
|
|
911
|
-
message.id = object.id ?? "";
|
|
912
|
-
message.address = object.address ?? "";
|
|
913
|
-
message.signature = object.signature ?? "";
|
|
914
|
-
message.monotonicClock = object.monotonicClock ?? 0;
|
|
915
|
-
return message;
|
|
916
|
-
},
|
|
917
|
-
};
|
|
918
|
-
|
|
919
|
-
function createBaseTaskTrigger(): TaskTrigger {
|
|
920
|
-
return { triggerType: 0, schedule: undefined, contractQuery: undefined, expression: undefined };
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
export const TaskTrigger: MessageFns<TaskTrigger> = {
|
|
924
|
-
encode(message: TaskTrigger, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
925
|
-
if (message.triggerType !== 0) {
|
|
926
|
-
writer.uint32(8).int32(message.triggerType);
|
|
927
|
-
}
|
|
928
|
-
if (message.schedule !== undefined) {
|
|
929
|
-
TimeCondition.encode(message.schedule, writer.uint32(18).fork()).join();
|
|
930
|
-
}
|
|
931
|
-
if (message.contractQuery !== undefined) {
|
|
932
|
-
ContractQueryCondition.encode(message.contractQuery, writer.uint32(26).fork()).join();
|
|
933
|
-
}
|
|
934
|
-
if (message.expression !== undefined) {
|
|
935
|
-
ExpressionCondition.encode(message.expression, writer.uint32(34).fork()).join();
|
|
936
|
-
}
|
|
937
|
-
return writer;
|
|
938
|
-
},
|
|
939
|
-
|
|
940
|
-
decode(input: BinaryReader | Uint8Array, length?: number): TaskTrigger {
|
|
941
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
942
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
943
|
-
const message = createBaseTaskTrigger();
|
|
944
|
-
while (reader.pos < end) {
|
|
945
|
-
const tag = reader.uint32();
|
|
946
|
-
switch (tag >>> 3) {
|
|
947
|
-
case 1: {
|
|
948
|
-
if (tag !== 8) {
|
|
949
|
-
break;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
message.triggerType = reader.int32() as any;
|
|
953
|
-
continue;
|
|
954
|
-
}
|
|
955
|
-
case 2: {
|
|
956
|
-
if (tag !== 18) {
|
|
957
|
-
break;
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
message.schedule = TimeCondition.decode(reader, reader.uint32());
|
|
961
|
-
continue;
|
|
962
|
-
}
|
|
963
|
-
case 3: {
|
|
964
|
-
if (tag !== 26) {
|
|
965
|
-
break;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
message.contractQuery = ContractQueryCondition.decode(reader, reader.uint32());
|
|
969
|
-
continue;
|
|
970
|
-
}
|
|
971
|
-
case 4: {
|
|
972
|
-
if (tag !== 34) {
|
|
973
|
-
break;
|
|
974
|
-
}
|
|
975
|
-
|
|
976
|
-
message.expression = ExpressionCondition.decode(reader, reader.uint32());
|
|
977
|
-
continue;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
981
|
-
break;
|
|
982
|
-
}
|
|
983
|
-
reader.skip(tag & 7);
|
|
984
|
-
}
|
|
985
|
-
return message;
|
|
986
|
-
},
|
|
987
|
-
|
|
988
|
-
fromJSON(object: any): TaskTrigger {
|
|
989
|
-
return {
|
|
990
|
-
triggerType: isSet(object.triggerType) ? triggerTypeFromJSON(object.triggerType) : 0,
|
|
991
|
-
schedule: isSet(object.schedule) ? TimeCondition.fromJSON(object.schedule) : undefined,
|
|
992
|
-
contractQuery: isSet(object.contractQuery) ? ContractQueryCondition.fromJSON(object.contractQuery) : undefined,
|
|
993
|
-
expression: isSet(object.expression) ? ExpressionCondition.fromJSON(object.expression) : undefined,
|
|
994
|
-
};
|
|
995
|
-
},
|
|
996
|
-
|
|
997
|
-
toJSON(message: TaskTrigger): unknown {
|
|
998
|
-
const obj: any = {};
|
|
999
|
-
if (message.triggerType !== 0) {
|
|
1000
|
-
obj.triggerType = triggerTypeToJSON(message.triggerType);
|
|
1001
|
-
}
|
|
1002
|
-
if (message.schedule !== undefined) {
|
|
1003
|
-
obj.schedule = TimeCondition.toJSON(message.schedule);
|
|
1004
|
-
}
|
|
1005
|
-
if (message.contractQuery !== undefined) {
|
|
1006
|
-
obj.contractQuery = ContractQueryCondition.toJSON(message.contractQuery);
|
|
1007
|
-
}
|
|
1008
|
-
if (message.expression !== undefined) {
|
|
1009
|
-
obj.expression = ExpressionCondition.toJSON(message.expression);
|
|
1010
|
-
}
|
|
1011
|
-
return obj;
|
|
1012
|
-
},
|
|
1013
|
-
|
|
1014
|
-
create<I extends Exact<DeepPartial<TaskTrigger>, I>>(base?: I): TaskTrigger {
|
|
1015
|
-
return TaskTrigger.fromPartial(base ?? ({} as any));
|
|
1016
|
-
},
|
|
1017
|
-
fromPartial<I extends Exact<DeepPartial<TaskTrigger>, I>>(object: I): TaskTrigger {
|
|
1018
|
-
const message = createBaseTaskTrigger();
|
|
1019
|
-
message.triggerType = object.triggerType ?? 0;
|
|
1020
|
-
message.schedule = (object.schedule !== undefined && object.schedule !== null)
|
|
1021
|
-
? TimeCondition.fromPartial(object.schedule)
|
|
1022
|
-
: undefined;
|
|
1023
|
-
message.contractQuery = (object.contractQuery !== undefined && object.contractQuery !== null)
|
|
1024
|
-
? ContractQueryCondition.fromPartial(object.contractQuery)
|
|
1025
|
-
: undefined;
|
|
1026
|
-
message.expression = (object.expression !== undefined && object.expression !== null)
|
|
1027
|
-
? ExpressionCondition.fromPartial(object.expression)
|
|
1028
|
-
: undefined;
|
|
1029
|
-
return message;
|
|
1030
|
-
},
|
|
1031
|
-
};
|
|
1032
|
-
|
|
1033
|
-
function createBaseTimeCondition(): TimeCondition {
|
|
1034
|
-
return { fixed: [], cron: "" };
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
export const TimeCondition: MessageFns<TimeCondition> = {
|
|
1038
|
-
encode(message: TimeCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1039
|
-
writer.uint32(10).fork();
|
|
1040
|
-
for (const v of message.fixed) {
|
|
1041
|
-
writer.int64(v);
|
|
1042
|
-
}
|
|
1043
|
-
writer.join();
|
|
1044
|
-
if (message.cron !== "") {
|
|
1045
|
-
writer.uint32(18).string(message.cron);
|
|
1046
|
-
}
|
|
1047
|
-
return writer;
|
|
1048
|
-
},
|
|
1049
|
-
|
|
1050
|
-
decode(input: BinaryReader | Uint8Array, length?: number): TimeCondition {
|
|
1051
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1052
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1053
|
-
const message = createBaseTimeCondition();
|
|
1054
|
-
while (reader.pos < end) {
|
|
1055
|
-
const tag = reader.uint32();
|
|
1056
|
-
switch (tag >>> 3) {
|
|
1057
|
-
case 1: {
|
|
1058
|
-
if (tag === 8) {
|
|
1059
|
-
message.fixed.push(longToNumber(reader.int64()));
|
|
1060
|
-
|
|
1061
|
-
continue;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
if (tag === 10) {
|
|
1065
|
-
const end2 = reader.uint32() + reader.pos;
|
|
1066
|
-
while (reader.pos < end2) {
|
|
1067
|
-
message.fixed.push(longToNumber(reader.int64()));
|
|
1068
|
-
}
|
|
1069
|
-
|
|
1070
|
-
continue;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
break;
|
|
1074
|
-
}
|
|
1075
|
-
case 2: {
|
|
1076
|
-
if (tag !== 18) {
|
|
1077
|
-
break;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
message.cron = reader.string();
|
|
1081
|
-
continue;
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1085
|
-
break;
|
|
1086
|
-
}
|
|
1087
|
-
reader.skip(tag & 7);
|
|
1088
|
-
}
|
|
1089
|
-
return message;
|
|
1090
|
-
},
|
|
1091
|
-
|
|
1092
|
-
fromJSON(object: any): TimeCondition {
|
|
1093
|
-
return {
|
|
1094
|
-
fixed: globalThis.Array.isArray(object?.fixed) ? object.fixed.map((e: any) => globalThis.Number(e)) : [],
|
|
1095
|
-
cron: isSet(object.cron) ? globalThis.String(object.cron) : "",
|
|
1096
|
-
};
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1099
|
-
toJSON(message: TimeCondition): unknown {
|
|
1100
|
-
const obj: any = {};
|
|
1101
|
-
if (message.fixed?.length) {
|
|
1102
|
-
obj.fixed = message.fixed.map((e) => Math.round(e));
|
|
1103
|
-
}
|
|
1104
|
-
if (message.cron !== "") {
|
|
1105
|
-
obj.cron = message.cron;
|
|
1106
|
-
}
|
|
1107
|
-
return obj;
|
|
1108
|
-
},
|
|
1109
|
-
|
|
1110
|
-
create<I extends Exact<DeepPartial<TimeCondition>, I>>(base?: I): TimeCondition {
|
|
1111
|
-
return TimeCondition.fromPartial(base ?? ({} as any));
|
|
1112
|
-
},
|
|
1113
|
-
fromPartial<I extends Exact<DeepPartial<TimeCondition>, I>>(object: I): TimeCondition {
|
|
1114
|
-
const message = createBaseTimeCondition();
|
|
1115
|
-
message.fixed = object.fixed?.map((e) => e) || [];
|
|
1116
|
-
message.cron = object.cron ?? "";
|
|
1117
|
-
return message;
|
|
1118
|
-
},
|
|
1119
|
-
};
|
|
1120
|
-
|
|
1121
|
-
function createBaseContractQueryCondition(): ContractQueryCondition {
|
|
1122
|
-
return { contractAddress: "", callmsg: "" };
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
export const ContractQueryCondition: MessageFns<ContractQueryCondition> = {
|
|
1126
|
-
encode(message: ContractQueryCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1127
|
-
if (message.contractAddress !== "") {
|
|
1128
|
-
writer.uint32(10).string(message.contractAddress);
|
|
1129
|
-
}
|
|
1130
|
-
if (message.callmsg !== "") {
|
|
1131
|
-
writer.uint32(18).string(message.callmsg);
|
|
1132
|
-
}
|
|
1133
|
-
return writer;
|
|
1134
|
-
},
|
|
1135
|
-
|
|
1136
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ContractQueryCondition {
|
|
1137
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1138
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1139
|
-
const message = createBaseContractQueryCondition();
|
|
1140
|
-
while (reader.pos < end) {
|
|
1141
|
-
const tag = reader.uint32();
|
|
1142
|
-
switch (tag >>> 3) {
|
|
1143
|
-
case 1: {
|
|
1144
|
-
if (tag !== 10) {
|
|
1145
|
-
break;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
message.contractAddress = reader.string();
|
|
1149
|
-
continue;
|
|
1150
|
-
}
|
|
1151
|
-
case 2: {
|
|
1152
|
-
if (tag !== 18) {
|
|
1153
|
-
break;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
message.callmsg = reader.string();
|
|
1157
|
-
continue;
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1161
|
-
break;
|
|
1162
|
-
}
|
|
1163
|
-
reader.skip(tag & 7);
|
|
1164
|
-
}
|
|
1165
|
-
return message;
|
|
1166
|
-
},
|
|
1167
|
-
|
|
1168
|
-
fromJSON(object: any): ContractQueryCondition {
|
|
1169
|
-
return {
|
|
1170
|
-
contractAddress: isSet(object.contractAddress) ? globalThis.String(object.contractAddress) : "",
|
|
1171
|
-
callmsg: isSet(object.callmsg) ? globalThis.String(object.callmsg) : "",
|
|
1172
|
-
};
|
|
1173
|
-
},
|
|
1174
|
-
|
|
1175
|
-
toJSON(message: ContractQueryCondition): unknown {
|
|
1176
|
-
const obj: any = {};
|
|
1177
|
-
if (message.contractAddress !== "") {
|
|
1178
|
-
obj.contractAddress = message.contractAddress;
|
|
1179
|
-
}
|
|
1180
|
-
if (message.callmsg !== "") {
|
|
1181
|
-
obj.callmsg = message.callmsg;
|
|
1182
|
-
}
|
|
1183
|
-
return obj;
|
|
1184
|
-
},
|
|
1185
|
-
|
|
1186
|
-
create<I extends Exact<DeepPartial<ContractQueryCondition>, I>>(base?: I): ContractQueryCondition {
|
|
1187
|
-
return ContractQueryCondition.fromPartial(base ?? ({} as any));
|
|
1188
|
-
},
|
|
1189
|
-
fromPartial<I extends Exact<DeepPartial<ContractQueryCondition>, I>>(object: I): ContractQueryCondition {
|
|
1190
|
-
const message = createBaseContractQueryCondition();
|
|
1191
|
-
message.contractAddress = object.contractAddress ?? "";
|
|
1192
|
-
message.callmsg = object.callmsg ?? "";
|
|
1193
|
-
return message;
|
|
1194
|
-
},
|
|
1195
|
-
};
|
|
1196
|
-
|
|
1197
|
-
function createBaseExpressionCondition(): ExpressionCondition {
|
|
1198
|
-
return { expression: "" };
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1201
|
-
export const ExpressionCondition: MessageFns<ExpressionCondition> = {
|
|
1202
|
-
encode(message: ExpressionCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1203
|
-
if (message.expression !== "") {
|
|
1204
|
-
writer.uint32(10).string(message.expression);
|
|
1205
|
-
}
|
|
1206
|
-
return writer;
|
|
1207
|
-
},
|
|
1208
|
-
|
|
1209
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ExpressionCondition {
|
|
1210
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1211
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1212
|
-
const message = createBaseExpressionCondition();
|
|
1213
|
-
while (reader.pos < end) {
|
|
1214
|
-
const tag = reader.uint32();
|
|
1215
|
-
switch (tag >>> 3) {
|
|
1216
|
-
case 1: {
|
|
1217
|
-
if (tag !== 10) {
|
|
1218
|
-
break;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
message.expression = reader.string();
|
|
1222
|
-
continue;
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1226
|
-
break;
|
|
1227
|
-
}
|
|
1228
|
-
reader.skip(tag & 7);
|
|
1229
|
-
}
|
|
1230
|
-
return message;
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1233
|
-
fromJSON(object: any): ExpressionCondition {
|
|
1234
|
-
return { expression: isSet(object.expression) ? globalThis.String(object.expression) : "" };
|
|
1235
|
-
},
|
|
1236
|
-
|
|
1237
|
-
toJSON(message: ExpressionCondition): unknown {
|
|
1238
|
-
const obj: any = {};
|
|
1239
|
-
if (message.expression !== "") {
|
|
1240
|
-
obj.expression = message.expression;
|
|
1241
|
-
}
|
|
1242
|
-
return obj;
|
|
1243
|
-
},
|
|
1244
|
-
|
|
1245
|
-
create<I extends Exact<DeepPartial<ExpressionCondition>, I>>(base?: I): ExpressionCondition {
|
|
1246
|
-
return ExpressionCondition.fromPartial(base ?? ({} as any));
|
|
1247
|
-
},
|
|
1248
|
-
fromPartial<I extends Exact<DeepPartial<ExpressionCondition>, I>>(object: I): ExpressionCondition {
|
|
1249
|
-
const message = createBaseExpressionCondition();
|
|
1250
|
-
message.expression = object.expression ?? "";
|
|
1251
|
-
return message;
|
|
1252
|
-
},
|
|
1253
|
-
};
|
|
1254
|
-
|
|
1255
|
-
function createBaseSyncTasksResp(): SyncTasksResp {
|
|
1256
|
-
return { id: "", checkType: "", trigger: undefined };
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
export const SyncTasksResp: MessageFns<SyncTasksResp> = {
|
|
1260
|
-
encode(message: SyncTasksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1261
|
-
if (message.id !== "") {
|
|
1262
|
-
writer.uint32(10).string(message.id);
|
|
1263
|
-
}
|
|
1264
|
-
if (message.checkType !== "") {
|
|
1265
|
-
writer.uint32(18).string(message.checkType);
|
|
1266
|
-
}
|
|
1267
|
-
if (message.trigger !== undefined) {
|
|
1268
|
-
TaskTrigger.encode(message.trigger, writer.uint32(26).fork()).join();
|
|
1269
|
-
}
|
|
1270
|
-
return writer;
|
|
1271
|
-
},
|
|
1272
|
-
|
|
1273
|
-
decode(input: BinaryReader | Uint8Array, length?: number): SyncTasksResp {
|
|
1274
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1275
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1276
|
-
const message = createBaseSyncTasksResp();
|
|
1277
|
-
while (reader.pos < end) {
|
|
1278
|
-
const tag = reader.uint32();
|
|
1279
|
-
switch (tag >>> 3) {
|
|
1280
|
-
case 1: {
|
|
1281
|
-
if (tag !== 10) {
|
|
1282
|
-
break;
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
message.id = reader.string();
|
|
1286
|
-
continue;
|
|
1287
|
-
}
|
|
1288
|
-
case 2: {
|
|
1289
|
-
if (tag !== 18) {
|
|
1290
|
-
break;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
message.checkType = reader.string();
|
|
1294
|
-
continue;
|
|
1295
|
-
}
|
|
1296
|
-
case 3: {
|
|
1297
|
-
if (tag !== 26) {
|
|
1298
|
-
break;
|
|
1299
|
-
}
|
|
1300
|
-
|
|
1301
|
-
message.trigger = TaskTrigger.decode(reader, reader.uint32());
|
|
1302
|
-
continue;
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1306
|
-
break;
|
|
1307
|
-
}
|
|
1308
|
-
reader.skip(tag & 7);
|
|
1309
|
-
}
|
|
1310
|
-
return message;
|
|
1311
|
-
},
|
|
1312
|
-
|
|
1313
|
-
fromJSON(object: any): SyncTasksResp {
|
|
1314
|
-
return {
|
|
1315
|
-
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1316
|
-
checkType: isSet(object.checkType) ? globalThis.String(object.checkType) : "",
|
|
1317
|
-
trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined,
|
|
1318
|
-
};
|
|
1319
|
-
},
|
|
1320
|
-
|
|
1321
|
-
toJSON(message: SyncTasksResp): unknown {
|
|
1322
|
-
const obj: any = {};
|
|
1323
|
-
if (message.id !== "") {
|
|
1324
|
-
obj.id = message.id;
|
|
1325
|
-
}
|
|
1326
|
-
if (message.checkType !== "") {
|
|
1327
|
-
obj.checkType = message.checkType;
|
|
1328
|
-
}
|
|
1329
|
-
if (message.trigger !== undefined) {
|
|
1330
|
-
obj.trigger = TaskTrigger.toJSON(message.trigger);
|
|
1331
|
-
}
|
|
1332
|
-
return obj;
|
|
1333
|
-
},
|
|
1334
|
-
|
|
1335
|
-
create<I extends Exact<DeepPartial<SyncTasksResp>, I>>(base?: I): SyncTasksResp {
|
|
1336
|
-
return SyncTasksResp.fromPartial(base ?? ({} as any));
|
|
1337
|
-
},
|
|
1338
|
-
fromPartial<I extends Exact<DeepPartial<SyncTasksResp>, I>>(object: I): SyncTasksResp {
|
|
1339
|
-
const message = createBaseSyncTasksResp();
|
|
1340
|
-
message.id = object.id ?? "";
|
|
1341
|
-
message.checkType = object.checkType ?? "";
|
|
1342
|
-
message.trigger = (object.trigger !== undefined && object.trigger !== null)
|
|
1343
|
-
? TaskTrigger.fromPartial(object.trigger)
|
|
1344
|
-
: undefined;
|
|
1345
|
-
return message;
|
|
1346
|
-
},
|
|
1347
|
-
};
|
|
1348
|
-
|
|
1349
|
-
function createBaseETHTransfer(): ETHTransfer {
|
|
1350
|
-
return { destination: "", amount: "" };
|
|
1351
|
-
}
|
|
1352
|
-
|
|
1353
|
-
export const ETHTransfer: MessageFns<ETHTransfer> = {
|
|
1354
|
-
encode(message: ETHTransfer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1355
|
-
if (message.destination !== "") {
|
|
1356
|
-
writer.uint32(10).string(message.destination);
|
|
1357
|
-
}
|
|
1358
|
-
if (message.amount !== "") {
|
|
1359
|
-
writer.uint32(18).string(message.amount);
|
|
1360
|
-
}
|
|
1361
|
-
return writer;
|
|
1362
|
-
},
|
|
1363
|
-
|
|
1364
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ETHTransfer {
|
|
1365
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1366
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1367
|
-
const message = createBaseETHTransfer();
|
|
1368
|
-
while (reader.pos < end) {
|
|
1369
|
-
const tag = reader.uint32();
|
|
1370
|
-
switch (tag >>> 3) {
|
|
1371
|
-
case 1: {
|
|
1372
|
-
if (tag !== 10) {
|
|
1373
|
-
break;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
message.destination = reader.string();
|
|
1377
|
-
continue;
|
|
1378
|
-
}
|
|
1379
|
-
case 2: {
|
|
1380
|
-
if (tag !== 18) {
|
|
1381
|
-
break;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
message.amount = reader.string();
|
|
1385
|
-
continue;
|
|
1386
|
-
}
|
|
1387
|
-
}
|
|
1388
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1389
|
-
break;
|
|
1390
|
-
}
|
|
1391
|
-
reader.skip(tag & 7);
|
|
1392
|
-
}
|
|
1393
|
-
return message;
|
|
1394
|
-
},
|
|
1395
|
-
|
|
1396
|
-
fromJSON(object: any): ETHTransfer {
|
|
1397
|
-
return {
|
|
1398
|
-
destination: isSet(object.destination) ? globalThis.String(object.destination) : "",
|
|
1399
|
-
amount: isSet(object.amount) ? globalThis.String(object.amount) : "",
|
|
1400
|
-
};
|
|
1401
|
-
},
|
|
1402
|
-
|
|
1403
|
-
toJSON(message: ETHTransfer): unknown {
|
|
1404
|
-
const obj: any = {};
|
|
1405
|
-
if (message.destination !== "") {
|
|
1406
|
-
obj.destination = message.destination;
|
|
1407
|
-
}
|
|
1408
|
-
if (message.amount !== "") {
|
|
1409
|
-
obj.amount = message.amount;
|
|
1410
|
-
}
|
|
1411
|
-
return obj;
|
|
1412
|
-
},
|
|
1413
|
-
|
|
1414
|
-
create<I extends Exact<DeepPartial<ETHTransfer>, I>>(base?: I): ETHTransfer {
|
|
1415
|
-
return ETHTransfer.fromPartial(base ?? ({} as any));
|
|
1416
|
-
},
|
|
1417
|
-
fromPartial<I extends Exact<DeepPartial<ETHTransfer>, I>>(object: I): ETHTransfer {
|
|
1418
|
-
const message = createBaseETHTransfer();
|
|
1419
|
-
message.destination = object.destination ?? "";
|
|
1420
|
-
message.amount = object.amount ?? "";
|
|
1421
|
-
return message;
|
|
1422
|
-
},
|
|
1423
|
-
};
|
|
1424
|
-
|
|
1425
|
-
function createBaseContractExecution(): ContractExecution {
|
|
1426
|
-
return { contractAddress: "", callData: "", method: "", encodedParams: "" };
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
export const ContractExecution: MessageFns<ContractExecution> = {
|
|
1430
|
-
encode(message: ContractExecution, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1431
|
-
if (message.contractAddress !== "") {
|
|
1432
|
-
writer.uint32(10).string(message.contractAddress);
|
|
1433
|
-
}
|
|
1434
|
-
if (message.callData !== "") {
|
|
1435
|
-
writer.uint32(18).string(message.callData);
|
|
1436
|
-
}
|
|
1437
|
-
if (message.method !== "") {
|
|
1438
|
-
writer.uint32(26).string(message.method);
|
|
1439
|
-
}
|
|
1440
|
-
if (message.encodedParams !== "") {
|
|
1441
|
-
writer.uint32(34).string(message.encodedParams);
|
|
1442
|
-
}
|
|
1443
|
-
return writer;
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1446
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ContractExecution {
|
|
1447
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1448
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1449
|
-
const message = createBaseContractExecution();
|
|
1450
|
-
while (reader.pos < end) {
|
|
1451
|
-
const tag = reader.uint32();
|
|
1452
|
-
switch (tag >>> 3) {
|
|
1453
|
-
case 1: {
|
|
1454
|
-
if (tag !== 10) {
|
|
1455
|
-
break;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
message.contractAddress = reader.string();
|
|
1459
|
-
continue;
|
|
1460
|
-
}
|
|
1461
|
-
case 2: {
|
|
1462
|
-
if (tag !== 18) {
|
|
1463
|
-
break;
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
message.callData = reader.string();
|
|
1467
|
-
continue;
|
|
1468
|
-
}
|
|
1469
|
-
case 3: {
|
|
1470
|
-
if (tag !== 26) {
|
|
1471
|
-
break;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
message.method = reader.string();
|
|
1475
|
-
continue;
|
|
1476
|
-
}
|
|
1477
|
-
case 4: {
|
|
1478
|
-
if (tag !== 34) {
|
|
1479
|
-
break;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
message.encodedParams = reader.string();
|
|
1483
|
-
continue;
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1487
|
-
break;
|
|
1488
|
-
}
|
|
1489
|
-
reader.skip(tag & 7);
|
|
1490
|
-
}
|
|
1491
|
-
return message;
|
|
1492
|
-
},
|
|
1493
|
-
|
|
1494
|
-
fromJSON(object: any): ContractExecution {
|
|
1495
|
-
return {
|
|
1496
|
-
contractAddress: isSet(object.contractAddress) ? globalThis.String(object.contractAddress) : "",
|
|
1497
|
-
callData: isSet(object.callData) ? globalThis.String(object.callData) : "",
|
|
1498
|
-
method: isSet(object.method) ? globalThis.String(object.method) : "",
|
|
1499
|
-
encodedParams: isSet(object.encodedParams) ? globalThis.String(object.encodedParams) : "",
|
|
1500
|
-
};
|
|
1501
|
-
},
|
|
1502
|
-
|
|
1503
|
-
toJSON(message: ContractExecution): unknown {
|
|
1504
|
-
const obj: any = {};
|
|
1505
|
-
if (message.contractAddress !== "") {
|
|
1506
|
-
obj.contractAddress = message.contractAddress;
|
|
1507
|
-
}
|
|
1508
|
-
if (message.callData !== "") {
|
|
1509
|
-
obj.callData = message.callData;
|
|
1510
|
-
}
|
|
1511
|
-
if (message.method !== "") {
|
|
1512
|
-
obj.method = message.method;
|
|
1513
|
-
}
|
|
1514
|
-
if (message.encodedParams !== "") {
|
|
1515
|
-
obj.encodedParams = message.encodedParams;
|
|
1516
|
-
}
|
|
1517
|
-
return obj;
|
|
1518
|
-
},
|
|
1519
|
-
|
|
1520
|
-
create<I extends Exact<DeepPartial<ContractExecution>, I>>(base?: I): ContractExecution {
|
|
1521
|
-
return ContractExecution.fromPartial(base ?? ({} as any));
|
|
1522
|
-
},
|
|
1523
|
-
fromPartial<I extends Exact<DeepPartial<ContractExecution>, I>>(object: I): ContractExecution {
|
|
1524
|
-
const message = createBaseContractExecution();
|
|
1525
|
-
message.contractAddress = object.contractAddress ?? "";
|
|
1526
|
-
message.callData = object.callData ?? "";
|
|
1527
|
-
message.method = object.method ?? "";
|
|
1528
|
-
message.encodedParams = object.encodedParams ?? "";
|
|
1529
|
-
return message;
|
|
1530
|
-
},
|
|
1531
|
-
};
|
|
1532
|
-
|
|
1533
|
-
function createBaseGraphQLDataQuery(): GraphQLDataQuery {
|
|
1534
|
-
return { url: "", query: "" };
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1537
|
-
export const GraphQLDataQuery: MessageFns<GraphQLDataQuery> = {
|
|
1538
|
-
encode(message: GraphQLDataQuery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1539
|
-
if (message.url !== "") {
|
|
1540
|
-
writer.uint32(10).string(message.url);
|
|
1541
|
-
}
|
|
1542
|
-
if (message.query !== "") {
|
|
1543
|
-
writer.uint32(18).string(message.query);
|
|
1544
|
-
}
|
|
1545
|
-
return writer;
|
|
1546
|
-
},
|
|
1547
|
-
|
|
1548
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GraphQLDataQuery {
|
|
1549
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1550
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1551
|
-
const message = createBaseGraphQLDataQuery();
|
|
1552
|
-
while (reader.pos < end) {
|
|
1553
|
-
const tag = reader.uint32();
|
|
1554
|
-
switch (tag >>> 3) {
|
|
1555
|
-
case 1: {
|
|
1556
|
-
if (tag !== 10) {
|
|
1557
|
-
break;
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
message.url = reader.string();
|
|
1561
|
-
continue;
|
|
1562
|
-
}
|
|
1563
|
-
case 2: {
|
|
1564
|
-
if (tag !== 18) {
|
|
1565
|
-
break;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
|
-
message.query = reader.string();
|
|
1569
|
-
continue;
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1573
|
-
break;
|
|
1574
|
-
}
|
|
1575
|
-
reader.skip(tag & 7);
|
|
1576
|
-
}
|
|
1577
|
-
return message;
|
|
1578
|
-
},
|
|
1579
|
-
|
|
1580
|
-
fromJSON(object: any): GraphQLDataQuery {
|
|
1581
|
-
return {
|
|
1582
|
-
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1583
|
-
query: isSet(object.query) ? globalThis.String(object.query) : "",
|
|
1584
|
-
};
|
|
1585
|
-
},
|
|
1586
|
-
|
|
1587
|
-
toJSON(message: GraphQLDataQuery): unknown {
|
|
1588
|
-
const obj: any = {};
|
|
1589
|
-
if (message.url !== "") {
|
|
1590
|
-
obj.url = message.url;
|
|
1591
|
-
}
|
|
1592
|
-
if (message.query !== "") {
|
|
1593
|
-
obj.query = message.query;
|
|
1594
|
-
}
|
|
1595
|
-
return obj;
|
|
1596
|
-
},
|
|
1597
|
-
|
|
1598
|
-
create<I extends Exact<DeepPartial<GraphQLDataQuery>, I>>(base?: I): GraphQLDataQuery {
|
|
1599
|
-
return GraphQLDataQuery.fromPartial(base ?? ({} as any));
|
|
1600
|
-
},
|
|
1601
|
-
fromPartial<I extends Exact<DeepPartial<GraphQLDataQuery>, I>>(object: I): GraphQLDataQuery {
|
|
1602
|
-
const message = createBaseGraphQLDataQuery();
|
|
1603
|
-
message.url = object.url ?? "";
|
|
1604
|
-
message.query = object.query ?? "";
|
|
1605
|
-
return message;
|
|
1606
|
-
},
|
|
1607
|
-
};
|
|
1608
|
-
|
|
1609
|
-
function createBaseHTTPAPICall(): HTTPAPICall {
|
|
1610
|
-
return { url: "", headers: {}, body: "" };
|
|
1611
|
-
}
|
|
1612
|
-
|
|
1613
|
-
export const HTTPAPICall: MessageFns<HTTPAPICall> = {
|
|
1614
|
-
encode(message: HTTPAPICall, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1615
|
-
if (message.url !== "") {
|
|
1616
|
-
writer.uint32(10).string(message.url);
|
|
1617
|
-
}
|
|
1618
|
-
Object.entries(message.headers).forEach(([key, value]) => {
|
|
1619
|
-
HTTPAPICall_HeadersEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join();
|
|
1620
|
-
});
|
|
1621
|
-
if (message.body !== "") {
|
|
1622
|
-
writer.uint32(26).string(message.body);
|
|
1623
|
-
}
|
|
1624
|
-
return writer;
|
|
1625
|
-
},
|
|
1626
|
-
|
|
1627
|
-
decode(input: BinaryReader | Uint8Array, length?: number): HTTPAPICall {
|
|
1628
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1629
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1630
|
-
const message = createBaseHTTPAPICall();
|
|
1631
|
-
while (reader.pos < end) {
|
|
1632
|
-
const tag = reader.uint32();
|
|
1633
|
-
switch (tag >>> 3) {
|
|
1634
|
-
case 1: {
|
|
1635
|
-
if (tag !== 10) {
|
|
1636
|
-
break;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
message.url = reader.string();
|
|
1640
|
-
continue;
|
|
1641
|
-
}
|
|
1642
|
-
case 2: {
|
|
1643
|
-
if (tag !== 18) {
|
|
1644
|
-
break;
|
|
1645
|
-
}
|
|
1646
|
-
|
|
1647
|
-
const entry2 = HTTPAPICall_HeadersEntry.decode(reader, reader.uint32());
|
|
1648
|
-
if (entry2.value !== undefined) {
|
|
1649
|
-
message.headers[entry2.key] = entry2.value;
|
|
1650
|
-
}
|
|
1651
|
-
continue;
|
|
1652
|
-
}
|
|
1653
|
-
case 3: {
|
|
1654
|
-
if (tag !== 26) {
|
|
1655
|
-
break;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
message.body = reader.string();
|
|
1659
|
-
continue;
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1663
|
-
break;
|
|
1664
|
-
}
|
|
1665
|
-
reader.skip(tag & 7);
|
|
1666
|
-
}
|
|
1667
|
-
return message;
|
|
1668
|
-
},
|
|
1669
|
-
|
|
1670
|
-
fromJSON(object: any): HTTPAPICall {
|
|
1671
|
-
return {
|
|
1672
|
-
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
1673
|
-
headers: isObject(object.headers)
|
|
1674
|
-
? Object.entries(object.headers).reduce<{ [key: string]: string }>((acc, [key, value]) => {
|
|
1675
|
-
acc[key] = String(value);
|
|
1676
|
-
return acc;
|
|
1677
|
-
}, {})
|
|
1678
|
-
: {},
|
|
1679
|
-
body: isSet(object.body) ? globalThis.String(object.body) : "",
|
|
1680
|
-
};
|
|
1681
|
-
},
|
|
1682
|
-
|
|
1683
|
-
toJSON(message: HTTPAPICall): unknown {
|
|
1684
|
-
const obj: any = {};
|
|
1685
|
-
if (message.url !== "") {
|
|
1686
|
-
obj.url = message.url;
|
|
1687
|
-
}
|
|
1688
|
-
if (message.headers) {
|
|
1689
|
-
const entries = Object.entries(message.headers);
|
|
1690
|
-
if (entries.length > 0) {
|
|
1691
|
-
obj.headers = {};
|
|
1692
|
-
entries.forEach(([k, v]) => {
|
|
1693
|
-
obj.headers[k] = v;
|
|
1694
|
-
});
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
if (message.body !== "") {
|
|
1698
|
-
obj.body = message.body;
|
|
1699
|
-
}
|
|
1700
|
-
return obj;
|
|
1701
|
-
},
|
|
1702
|
-
|
|
1703
|
-
create<I extends Exact<DeepPartial<HTTPAPICall>, I>>(base?: I): HTTPAPICall {
|
|
1704
|
-
return HTTPAPICall.fromPartial(base ?? ({} as any));
|
|
1705
|
-
},
|
|
1706
|
-
fromPartial<I extends Exact<DeepPartial<HTTPAPICall>, I>>(object: I): HTTPAPICall {
|
|
1707
|
-
const message = createBaseHTTPAPICall();
|
|
1708
|
-
message.url = object.url ?? "";
|
|
1709
|
-
message.headers = Object.entries(object.headers ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => {
|
|
1710
|
-
if (value !== undefined) {
|
|
1711
|
-
acc[key] = globalThis.String(value);
|
|
1712
|
-
}
|
|
1713
|
-
return acc;
|
|
1714
|
-
}, {});
|
|
1715
|
-
message.body = object.body ?? "";
|
|
1716
|
-
return message;
|
|
1717
|
-
},
|
|
1718
|
-
};
|
|
1719
|
-
|
|
1720
|
-
function createBaseHTTPAPICall_HeadersEntry(): HTTPAPICall_HeadersEntry {
|
|
1721
|
-
return { key: "", value: "" };
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
export const HTTPAPICall_HeadersEntry: MessageFns<HTTPAPICall_HeadersEntry> = {
|
|
1725
|
-
encode(message: HTTPAPICall_HeadersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1726
|
-
if (message.key !== "") {
|
|
1727
|
-
writer.uint32(10).string(message.key);
|
|
1728
|
-
}
|
|
1729
|
-
if (message.value !== "") {
|
|
1730
|
-
writer.uint32(18).string(message.value);
|
|
1731
|
-
}
|
|
1732
|
-
return writer;
|
|
1733
|
-
},
|
|
1734
|
-
|
|
1735
|
-
decode(input: BinaryReader | Uint8Array, length?: number): HTTPAPICall_HeadersEntry {
|
|
1736
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1737
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1738
|
-
const message = createBaseHTTPAPICall_HeadersEntry();
|
|
1739
|
-
while (reader.pos < end) {
|
|
1740
|
-
const tag = reader.uint32();
|
|
1741
|
-
switch (tag >>> 3) {
|
|
1742
|
-
case 1: {
|
|
1743
|
-
if (tag !== 10) {
|
|
1744
|
-
break;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
message.key = reader.string();
|
|
1748
|
-
continue;
|
|
1749
|
-
}
|
|
1750
|
-
case 2: {
|
|
1751
|
-
if (tag !== 18) {
|
|
1752
|
-
break;
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
message.value = reader.string();
|
|
1756
|
-
continue;
|
|
1757
|
-
}
|
|
1758
|
-
}
|
|
1759
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1760
|
-
break;
|
|
1761
|
-
}
|
|
1762
|
-
reader.skip(tag & 7);
|
|
1763
|
-
}
|
|
1764
|
-
return message;
|
|
1765
|
-
},
|
|
1766
|
-
|
|
1767
|
-
fromJSON(object: any): HTTPAPICall_HeadersEntry {
|
|
1768
|
-
return {
|
|
1769
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
1770
|
-
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
1771
|
-
};
|
|
1772
|
-
},
|
|
1773
|
-
|
|
1774
|
-
toJSON(message: HTTPAPICall_HeadersEntry): unknown {
|
|
1775
|
-
const obj: any = {};
|
|
1776
|
-
if (message.key !== "") {
|
|
1777
|
-
obj.key = message.key;
|
|
1778
|
-
}
|
|
1779
|
-
if (message.value !== "") {
|
|
1780
|
-
obj.value = message.value;
|
|
1781
|
-
}
|
|
1782
|
-
return obj;
|
|
1783
|
-
},
|
|
1784
|
-
|
|
1785
|
-
create<I extends Exact<DeepPartial<HTTPAPICall_HeadersEntry>, I>>(base?: I): HTTPAPICall_HeadersEntry {
|
|
1786
|
-
return HTTPAPICall_HeadersEntry.fromPartial(base ?? ({} as any));
|
|
1787
|
-
},
|
|
1788
|
-
fromPartial<I extends Exact<DeepPartial<HTTPAPICall_HeadersEntry>, I>>(object: I): HTTPAPICall_HeadersEntry {
|
|
1789
|
-
const message = createBaseHTTPAPICall_HeadersEntry();
|
|
1790
|
-
message.key = object.key ?? "";
|
|
1791
|
-
message.value = object.value ?? "";
|
|
1792
|
-
return message;
|
|
1793
|
-
},
|
|
1794
|
-
};
|
|
1795
|
-
|
|
1796
|
-
function createBaseCustomCode(): CustomCode {
|
|
1797
|
-
return { type: 0, body: "" };
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
export const CustomCode: MessageFns<CustomCode> = {
|
|
1801
|
-
encode(message: CustomCode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1802
|
-
if (message.type !== 0) {
|
|
1803
|
-
writer.uint32(8).int32(message.type);
|
|
1804
|
-
}
|
|
1805
|
-
if (message.body !== "") {
|
|
1806
|
-
writer.uint32(18).string(message.body);
|
|
1807
|
-
}
|
|
1808
|
-
return writer;
|
|
1809
|
-
},
|
|
1810
|
-
|
|
1811
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CustomCode {
|
|
1812
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1813
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1814
|
-
const message = createBaseCustomCode();
|
|
1815
|
-
while (reader.pos < end) {
|
|
1816
|
-
const tag = reader.uint32();
|
|
1817
|
-
switch (tag >>> 3) {
|
|
1818
|
-
case 1: {
|
|
1819
|
-
if (tag !== 8) {
|
|
1820
|
-
break;
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
message.type = reader.int32() as any;
|
|
1824
|
-
continue;
|
|
1825
|
-
}
|
|
1826
|
-
case 2: {
|
|
1827
|
-
if (tag !== 18) {
|
|
1828
|
-
break;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
message.body = reader.string();
|
|
1832
|
-
continue;
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1836
|
-
break;
|
|
1837
|
-
}
|
|
1838
|
-
reader.skip(tag & 7);
|
|
1839
|
-
}
|
|
1840
|
-
return message;
|
|
1841
|
-
},
|
|
1842
|
-
|
|
1843
|
-
fromJSON(object: any): CustomCode {
|
|
1844
|
-
return {
|
|
1845
|
-
type: isSet(object.type) ? customCodeTypeFromJSON(object.type) : 0,
|
|
1846
|
-
body: isSet(object.body) ? globalThis.String(object.body) : "",
|
|
1847
|
-
};
|
|
1848
|
-
},
|
|
1849
|
-
|
|
1850
|
-
toJSON(message: CustomCode): unknown {
|
|
1851
|
-
const obj: any = {};
|
|
1852
|
-
if (message.type !== 0) {
|
|
1853
|
-
obj.type = customCodeTypeToJSON(message.type);
|
|
1854
|
-
}
|
|
1855
|
-
if (message.body !== "") {
|
|
1856
|
-
obj.body = message.body;
|
|
1857
|
-
}
|
|
1858
|
-
return obj;
|
|
1859
|
-
},
|
|
1860
|
-
|
|
1861
|
-
create<I extends Exact<DeepPartial<CustomCode>, I>>(base?: I): CustomCode {
|
|
1862
|
-
return CustomCode.fromPartial(base ?? ({} as any));
|
|
1863
|
-
},
|
|
1864
|
-
fromPartial<I extends Exact<DeepPartial<CustomCode>, I>>(object: I): CustomCode {
|
|
1865
|
-
const message = createBaseCustomCode();
|
|
1866
|
-
message.type = object.type ?? 0;
|
|
1867
|
-
message.body = object.body ?? "";
|
|
1868
|
-
return message;
|
|
1869
|
-
},
|
|
1870
|
-
};
|
|
1871
|
-
|
|
1872
|
-
function createBaseConditionJump(): ConditionJump {
|
|
1873
|
-
return { expression: "", next: "" };
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
export const ConditionJump: MessageFns<ConditionJump> = {
|
|
1877
|
-
encode(message: ConditionJump, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1878
|
-
if (message.expression !== "") {
|
|
1879
|
-
writer.uint32(10).string(message.expression);
|
|
1880
|
-
}
|
|
1881
|
-
if (message.next !== "") {
|
|
1882
|
-
writer.uint32(18).string(message.next);
|
|
1883
|
-
}
|
|
1884
|
-
return writer;
|
|
1885
|
-
},
|
|
1886
|
-
|
|
1887
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ConditionJump {
|
|
1888
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1889
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1890
|
-
const message = createBaseConditionJump();
|
|
1891
|
-
while (reader.pos < end) {
|
|
1892
|
-
const tag = reader.uint32();
|
|
1893
|
-
switch (tag >>> 3) {
|
|
1894
|
-
case 1: {
|
|
1895
|
-
if (tag !== 10) {
|
|
1896
|
-
break;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
message.expression = reader.string();
|
|
1900
|
-
continue;
|
|
1901
|
-
}
|
|
1902
|
-
case 2: {
|
|
1903
|
-
if (tag !== 18) {
|
|
1904
|
-
break;
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
message.next = reader.string();
|
|
1908
|
-
continue;
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1912
|
-
break;
|
|
1913
|
-
}
|
|
1914
|
-
reader.skip(tag & 7);
|
|
1915
|
-
}
|
|
1916
|
-
return message;
|
|
1917
|
-
},
|
|
1918
|
-
|
|
1919
|
-
fromJSON(object: any): ConditionJump {
|
|
1920
|
-
return {
|
|
1921
|
-
expression: isSet(object.expression) ? globalThis.String(object.expression) : "",
|
|
1922
|
-
next: isSet(object.next) ? globalThis.String(object.next) : "",
|
|
1923
|
-
};
|
|
1924
|
-
},
|
|
1925
|
-
|
|
1926
|
-
toJSON(message: ConditionJump): unknown {
|
|
1927
|
-
const obj: any = {};
|
|
1928
|
-
if (message.expression !== "") {
|
|
1929
|
-
obj.expression = message.expression;
|
|
1930
|
-
}
|
|
1931
|
-
if (message.next !== "") {
|
|
1932
|
-
obj.next = message.next;
|
|
1933
|
-
}
|
|
1934
|
-
return obj;
|
|
1935
|
-
},
|
|
1936
|
-
|
|
1937
|
-
create<I extends Exact<DeepPartial<ConditionJump>, I>>(base?: I): ConditionJump {
|
|
1938
|
-
return ConditionJump.fromPartial(base ?? ({} as any));
|
|
1939
|
-
},
|
|
1940
|
-
fromPartial<I extends Exact<DeepPartial<ConditionJump>, I>>(object: I): ConditionJump {
|
|
1941
|
-
const message = createBaseConditionJump();
|
|
1942
|
-
message.expression = object.expression ?? "";
|
|
1943
|
-
message.next = object.next ?? "";
|
|
1944
|
-
return message;
|
|
1945
|
-
},
|
|
1946
|
-
};
|
|
1947
|
-
|
|
1948
|
-
function createBaseBranchAction(): BranchAction {
|
|
1949
|
-
return { If: undefined, ElseIfs: [], Else: undefined };
|
|
1950
|
-
}
|
|
1951
|
-
|
|
1952
|
-
export const BranchAction: MessageFns<BranchAction> = {
|
|
1953
|
-
encode(message: BranchAction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1954
|
-
if (message.If !== undefined) {
|
|
1955
|
-
ConditionJump.encode(message.If, writer.uint32(10).fork()).join();
|
|
1956
|
-
}
|
|
1957
|
-
for (const v of message.ElseIfs) {
|
|
1958
|
-
ConditionJump.encode(v!, writer.uint32(18).fork()).join();
|
|
1959
|
-
}
|
|
1960
|
-
if (message.Else !== undefined) {
|
|
1961
|
-
ConditionJump.encode(message.Else, writer.uint32(26).fork()).join();
|
|
1962
|
-
}
|
|
1963
|
-
return writer;
|
|
1964
|
-
},
|
|
1965
|
-
|
|
1966
|
-
decode(input: BinaryReader | Uint8Array, length?: number): BranchAction {
|
|
1967
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1968
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1969
|
-
const message = createBaseBranchAction();
|
|
1970
|
-
while (reader.pos < end) {
|
|
1971
|
-
const tag = reader.uint32();
|
|
1972
|
-
switch (tag >>> 3) {
|
|
1973
|
-
case 1: {
|
|
1974
|
-
if (tag !== 10) {
|
|
1975
|
-
break;
|
|
1976
|
-
}
|
|
1977
|
-
|
|
1978
|
-
message.If = ConditionJump.decode(reader, reader.uint32());
|
|
1979
|
-
continue;
|
|
1980
|
-
}
|
|
1981
|
-
case 2: {
|
|
1982
|
-
if (tag !== 18) {
|
|
1983
|
-
break;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
message.ElseIfs.push(ConditionJump.decode(reader, reader.uint32()));
|
|
1987
|
-
continue;
|
|
1988
|
-
}
|
|
1989
|
-
case 3: {
|
|
1990
|
-
if (tag !== 26) {
|
|
1991
|
-
break;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
message.Else = ConditionJump.decode(reader, reader.uint32());
|
|
1995
|
-
continue;
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
1999
|
-
break;
|
|
2000
|
-
}
|
|
2001
|
-
reader.skip(tag & 7);
|
|
2002
|
-
}
|
|
2003
|
-
return message;
|
|
2004
|
-
},
|
|
2005
|
-
|
|
2006
|
-
fromJSON(object: any): BranchAction {
|
|
2007
|
-
return {
|
|
2008
|
-
If: isSet(object.If) ? ConditionJump.fromJSON(object.If) : undefined,
|
|
2009
|
-
ElseIfs: globalThis.Array.isArray(object?.ElseIfs)
|
|
2010
|
-
? object.ElseIfs.map((e: any) => ConditionJump.fromJSON(e))
|
|
2011
|
-
: [],
|
|
2012
|
-
Else: isSet(object.Else) ? ConditionJump.fromJSON(object.Else) : undefined,
|
|
2013
|
-
};
|
|
2014
|
-
},
|
|
2015
|
-
|
|
2016
|
-
toJSON(message: BranchAction): unknown {
|
|
2017
|
-
const obj: any = {};
|
|
2018
|
-
if (message.If !== undefined) {
|
|
2019
|
-
obj.If = ConditionJump.toJSON(message.If);
|
|
2020
|
-
}
|
|
2021
|
-
if (message.ElseIfs?.length) {
|
|
2022
|
-
obj.ElseIfs = message.ElseIfs.map((e) => ConditionJump.toJSON(e));
|
|
2023
|
-
}
|
|
2024
|
-
if (message.Else !== undefined) {
|
|
2025
|
-
obj.Else = ConditionJump.toJSON(message.Else);
|
|
2026
|
-
}
|
|
2027
|
-
return obj;
|
|
2028
|
-
},
|
|
2029
|
-
|
|
2030
|
-
create<I extends Exact<DeepPartial<BranchAction>, I>>(base?: I): BranchAction {
|
|
2031
|
-
return BranchAction.fromPartial(base ?? ({} as any));
|
|
2032
|
-
},
|
|
2033
|
-
fromPartial<I extends Exact<DeepPartial<BranchAction>, I>>(object: I): BranchAction {
|
|
2034
|
-
const message = createBaseBranchAction();
|
|
2035
|
-
message.If = (object.If !== undefined && object.If !== null) ? ConditionJump.fromPartial(object.If) : undefined;
|
|
2036
|
-
message.ElseIfs = object.ElseIfs?.map((e) => ConditionJump.fromPartial(e)) || [];
|
|
2037
|
-
message.Else = (object.Else !== undefined && object.Else !== null)
|
|
2038
|
-
? ConditionJump.fromPartial(object.Else)
|
|
2039
|
-
: undefined;
|
|
2040
|
-
return message;
|
|
2041
|
-
},
|
|
2042
|
-
};
|
|
2043
|
-
|
|
2044
|
-
function createBaseTaskAction(): TaskAction {
|
|
2045
|
-
return {
|
|
2046
|
-
taskType: 0,
|
|
2047
|
-
id: "",
|
|
2048
|
-
name: "",
|
|
2049
|
-
next: [],
|
|
2050
|
-
ethTransfer: undefined,
|
|
2051
|
-
contractExecution: undefined,
|
|
2052
|
-
graphqlDataQuery: undefined,
|
|
2053
|
-
httpDataQuery: undefined,
|
|
2054
|
-
customCode: undefined,
|
|
2055
|
-
branch: undefined,
|
|
2056
|
-
};
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
export const TaskAction: MessageFns<TaskAction> = {
|
|
2060
|
-
encode(message: TaskAction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2061
|
-
if (message.taskType !== 0) {
|
|
2062
|
-
writer.uint32(8).int32(message.taskType);
|
|
2063
|
-
}
|
|
2064
|
-
if (message.id !== "") {
|
|
2065
|
-
writer.uint32(18).string(message.id);
|
|
2066
|
-
}
|
|
2067
|
-
if (message.name !== "") {
|
|
2068
|
-
writer.uint32(26).string(message.name);
|
|
2069
|
-
}
|
|
2070
|
-
for (const v of message.next) {
|
|
2071
|
-
writer.uint32(34).string(v!);
|
|
2072
|
-
}
|
|
2073
|
-
if (message.ethTransfer !== undefined) {
|
|
2074
|
-
ETHTransfer.encode(message.ethTransfer, writer.uint32(82).fork()).join();
|
|
2075
|
-
}
|
|
2076
|
-
if (message.contractExecution !== undefined) {
|
|
2077
|
-
ContractExecution.encode(message.contractExecution, writer.uint32(90).fork()).join();
|
|
2078
|
-
}
|
|
2079
|
-
if (message.graphqlDataQuery !== undefined) {
|
|
2080
|
-
GraphQLDataQuery.encode(message.graphqlDataQuery, writer.uint32(98).fork()).join();
|
|
2081
|
-
}
|
|
2082
|
-
if (message.httpDataQuery !== undefined) {
|
|
2083
|
-
HTTPAPICall.encode(message.httpDataQuery, writer.uint32(106).fork()).join();
|
|
2084
|
-
}
|
|
2085
|
-
if (message.customCode !== undefined) {
|
|
2086
|
-
CustomCode.encode(message.customCode, writer.uint32(114).fork()).join();
|
|
2087
|
-
}
|
|
2088
|
-
if (message.branch !== undefined) {
|
|
2089
|
-
BranchAction.encode(message.branch, writer.uint32(122).fork()).join();
|
|
2090
|
-
}
|
|
2091
|
-
return writer;
|
|
2092
|
-
},
|
|
2093
|
-
|
|
2094
|
-
decode(input: BinaryReader | Uint8Array, length?: number): TaskAction {
|
|
2095
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2096
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2097
|
-
const message = createBaseTaskAction();
|
|
2098
|
-
while (reader.pos < end) {
|
|
2099
|
-
const tag = reader.uint32();
|
|
2100
|
-
switch (tag >>> 3) {
|
|
2101
|
-
case 1: {
|
|
2102
|
-
if (tag !== 8) {
|
|
2103
|
-
break;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
message.taskType = reader.int32() as any;
|
|
2107
|
-
continue;
|
|
2108
|
-
}
|
|
2109
|
-
case 2: {
|
|
2110
|
-
if (tag !== 18) {
|
|
2111
|
-
break;
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2114
|
-
message.id = reader.string();
|
|
2115
|
-
continue;
|
|
2116
|
-
}
|
|
2117
|
-
case 3: {
|
|
2118
|
-
if (tag !== 26) {
|
|
2119
|
-
break;
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2122
|
-
message.name = reader.string();
|
|
2123
|
-
continue;
|
|
2124
|
-
}
|
|
2125
|
-
case 4: {
|
|
2126
|
-
if (tag !== 34) {
|
|
2127
|
-
break;
|
|
2128
|
-
}
|
|
2129
|
-
|
|
2130
|
-
message.next.push(reader.string());
|
|
2131
|
-
continue;
|
|
2132
|
-
}
|
|
2133
|
-
case 10: {
|
|
2134
|
-
if (tag !== 82) {
|
|
2135
|
-
break;
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2138
|
-
message.ethTransfer = ETHTransfer.decode(reader, reader.uint32());
|
|
2139
|
-
continue;
|
|
2140
|
-
}
|
|
2141
|
-
case 11: {
|
|
2142
|
-
if (tag !== 90) {
|
|
2143
|
-
break;
|
|
2144
|
-
}
|
|
2145
|
-
|
|
2146
|
-
message.contractExecution = ContractExecution.decode(reader, reader.uint32());
|
|
2147
|
-
continue;
|
|
2148
|
-
}
|
|
2149
|
-
case 12: {
|
|
2150
|
-
if (tag !== 98) {
|
|
2151
|
-
break;
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
|
-
message.graphqlDataQuery = GraphQLDataQuery.decode(reader, reader.uint32());
|
|
2155
|
-
continue;
|
|
2156
|
-
}
|
|
2157
|
-
case 13: {
|
|
2158
|
-
if (tag !== 106) {
|
|
2159
|
-
break;
|
|
2160
|
-
}
|
|
2161
|
-
|
|
2162
|
-
message.httpDataQuery = HTTPAPICall.decode(reader, reader.uint32());
|
|
2163
|
-
continue;
|
|
2164
|
-
}
|
|
2165
|
-
case 14: {
|
|
2166
|
-
if (tag !== 114) {
|
|
2167
|
-
break;
|
|
2168
|
-
}
|
|
2169
|
-
|
|
2170
|
-
message.customCode = CustomCode.decode(reader, reader.uint32());
|
|
2171
|
-
continue;
|
|
2172
|
-
}
|
|
2173
|
-
case 15: {
|
|
2174
|
-
if (tag !== 122) {
|
|
2175
|
-
break;
|
|
2176
|
-
}
|
|
2177
|
-
|
|
2178
|
-
message.branch = BranchAction.decode(reader, reader.uint32());
|
|
2179
|
-
continue;
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2183
|
-
break;
|
|
2184
|
-
}
|
|
2185
|
-
reader.skip(tag & 7);
|
|
2186
|
-
}
|
|
2187
|
-
return message;
|
|
2188
|
-
},
|
|
2189
|
-
|
|
2190
|
-
fromJSON(object: any): TaskAction {
|
|
2191
|
-
return {
|
|
2192
|
-
taskType: isSet(object.taskType) ? taskTypeFromJSON(object.taskType) : 0,
|
|
2193
|
-
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
2194
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2195
|
-
next: globalThis.Array.isArray(object?.next) ? object.next.map((e: any) => globalThis.String(e)) : [],
|
|
2196
|
-
ethTransfer: isSet(object.ethTransfer) ? ETHTransfer.fromJSON(object.ethTransfer) : undefined,
|
|
2197
|
-
contractExecution: isSet(object.contractExecution)
|
|
2198
|
-
? ContractExecution.fromJSON(object.contractExecution)
|
|
2199
|
-
: undefined,
|
|
2200
|
-
graphqlDataQuery: isSet(object.graphqlDataQuery) ? GraphQLDataQuery.fromJSON(object.graphqlDataQuery) : undefined,
|
|
2201
|
-
httpDataQuery: isSet(object.httpDataQuery) ? HTTPAPICall.fromJSON(object.httpDataQuery) : undefined,
|
|
2202
|
-
customCode: isSet(object.customCode) ? CustomCode.fromJSON(object.customCode) : undefined,
|
|
2203
|
-
branch: isSet(object.branch) ? BranchAction.fromJSON(object.branch) : undefined,
|
|
2204
|
-
};
|
|
2205
|
-
},
|
|
2206
|
-
|
|
2207
|
-
toJSON(message: TaskAction): unknown {
|
|
2208
|
-
const obj: any = {};
|
|
2209
|
-
if (message.taskType !== 0) {
|
|
2210
|
-
obj.taskType = taskTypeToJSON(message.taskType);
|
|
2211
|
-
}
|
|
2212
|
-
if (message.id !== "") {
|
|
2213
|
-
obj.id = message.id;
|
|
2214
|
-
}
|
|
2215
|
-
if (message.name !== "") {
|
|
2216
|
-
obj.name = message.name;
|
|
2217
|
-
}
|
|
2218
|
-
if (message.next?.length) {
|
|
2219
|
-
obj.next = message.next;
|
|
2220
|
-
}
|
|
2221
|
-
if (message.ethTransfer !== undefined) {
|
|
2222
|
-
obj.ethTransfer = ETHTransfer.toJSON(message.ethTransfer);
|
|
2223
|
-
}
|
|
2224
|
-
if (message.contractExecution !== undefined) {
|
|
2225
|
-
obj.contractExecution = ContractExecution.toJSON(message.contractExecution);
|
|
2226
|
-
}
|
|
2227
|
-
if (message.graphqlDataQuery !== undefined) {
|
|
2228
|
-
obj.graphqlDataQuery = GraphQLDataQuery.toJSON(message.graphqlDataQuery);
|
|
2229
|
-
}
|
|
2230
|
-
if (message.httpDataQuery !== undefined) {
|
|
2231
|
-
obj.httpDataQuery = HTTPAPICall.toJSON(message.httpDataQuery);
|
|
2232
|
-
}
|
|
2233
|
-
if (message.customCode !== undefined) {
|
|
2234
|
-
obj.customCode = CustomCode.toJSON(message.customCode);
|
|
2235
|
-
}
|
|
2236
|
-
if (message.branch !== undefined) {
|
|
2237
|
-
obj.branch = BranchAction.toJSON(message.branch);
|
|
2238
|
-
}
|
|
2239
|
-
return obj;
|
|
2240
|
-
},
|
|
2241
|
-
|
|
2242
|
-
create<I extends Exact<DeepPartial<TaskAction>, I>>(base?: I): TaskAction {
|
|
2243
|
-
return TaskAction.fromPartial(base ?? ({} as any));
|
|
2244
|
-
},
|
|
2245
|
-
fromPartial<I extends Exact<DeepPartial<TaskAction>, I>>(object: I): TaskAction {
|
|
2246
|
-
const message = createBaseTaskAction();
|
|
2247
|
-
message.taskType = object.taskType ?? 0;
|
|
2248
|
-
message.id = object.id ?? "";
|
|
2249
|
-
message.name = object.name ?? "";
|
|
2250
|
-
message.next = object.next?.map((e) => e) || [];
|
|
2251
|
-
message.ethTransfer = (object.ethTransfer !== undefined && object.ethTransfer !== null)
|
|
2252
|
-
? ETHTransfer.fromPartial(object.ethTransfer)
|
|
2253
|
-
: undefined;
|
|
2254
|
-
message.contractExecution = (object.contractExecution !== undefined && object.contractExecution !== null)
|
|
2255
|
-
? ContractExecution.fromPartial(object.contractExecution)
|
|
2256
|
-
: undefined;
|
|
2257
|
-
message.graphqlDataQuery = (object.graphqlDataQuery !== undefined && object.graphqlDataQuery !== null)
|
|
2258
|
-
? GraphQLDataQuery.fromPartial(object.graphqlDataQuery)
|
|
2259
|
-
: undefined;
|
|
2260
|
-
message.httpDataQuery = (object.httpDataQuery !== undefined && object.httpDataQuery !== null)
|
|
2261
|
-
? HTTPAPICall.fromPartial(object.httpDataQuery)
|
|
2262
|
-
: undefined;
|
|
2263
|
-
message.customCode = (object.customCode !== undefined && object.customCode !== null)
|
|
2264
|
-
? CustomCode.fromPartial(object.customCode)
|
|
2265
|
-
: undefined;
|
|
2266
|
-
message.branch = (object.branch !== undefined && object.branch !== null)
|
|
2267
|
-
? BranchAction.fromPartial(object.branch)
|
|
2268
|
-
: undefined;
|
|
2269
|
-
return message;
|
|
2270
|
-
},
|
|
2271
|
-
};
|
|
2272
|
-
|
|
2273
|
-
function createBaseExecution(): Execution {
|
|
2274
|
-
return { epoch: 0, userOpHash: "", error: "" };
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
export const Execution: MessageFns<Execution> = {
|
|
2278
|
-
encode(message: Execution, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2279
|
-
if (message.epoch !== 0) {
|
|
2280
|
-
writer.uint32(8).int64(message.epoch);
|
|
2281
|
-
}
|
|
2282
|
-
if (message.userOpHash !== "") {
|
|
2283
|
-
writer.uint32(18).string(message.userOpHash);
|
|
2284
|
-
}
|
|
2285
|
-
if (message.error !== "") {
|
|
2286
|
-
writer.uint32(26).string(message.error);
|
|
2287
|
-
}
|
|
2288
|
-
return writer;
|
|
2289
|
-
},
|
|
2290
|
-
|
|
2291
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Execution {
|
|
2292
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2293
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2294
|
-
const message = createBaseExecution();
|
|
2295
|
-
while (reader.pos < end) {
|
|
2296
|
-
const tag = reader.uint32();
|
|
2297
|
-
switch (tag >>> 3) {
|
|
2298
|
-
case 1: {
|
|
2299
|
-
if (tag !== 8) {
|
|
2300
|
-
break;
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
message.epoch = longToNumber(reader.int64());
|
|
2304
|
-
continue;
|
|
2305
|
-
}
|
|
2306
|
-
case 2: {
|
|
2307
|
-
if (tag !== 18) {
|
|
2308
|
-
break;
|
|
2309
|
-
}
|
|
2310
|
-
|
|
2311
|
-
message.userOpHash = reader.string();
|
|
2312
|
-
continue;
|
|
2313
|
-
}
|
|
2314
|
-
case 3: {
|
|
2315
|
-
if (tag !== 26) {
|
|
2316
|
-
break;
|
|
2317
|
-
}
|
|
2318
|
-
|
|
2319
|
-
message.error = reader.string();
|
|
2320
|
-
continue;
|
|
2321
|
-
}
|
|
2322
|
-
}
|
|
2323
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2324
|
-
break;
|
|
2325
|
-
}
|
|
2326
|
-
reader.skip(tag & 7);
|
|
2327
|
-
}
|
|
2328
|
-
return message;
|
|
2329
|
-
},
|
|
2330
|
-
|
|
2331
|
-
fromJSON(object: any): Execution {
|
|
2332
|
-
return {
|
|
2333
|
-
epoch: isSet(object.epoch) ? globalThis.Number(object.epoch) : 0,
|
|
2334
|
-
userOpHash: isSet(object.userOpHash) ? globalThis.String(object.userOpHash) : "",
|
|
2335
|
-
error: isSet(object.error) ? globalThis.String(object.error) : "",
|
|
2336
|
-
};
|
|
2337
|
-
},
|
|
2338
|
-
|
|
2339
|
-
toJSON(message: Execution): unknown {
|
|
2340
|
-
const obj: any = {};
|
|
2341
|
-
if (message.epoch !== 0) {
|
|
2342
|
-
obj.epoch = Math.round(message.epoch);
|
|
2343
|
-
}
|
|
2344
|
-
if (message.userOpHash !== "") {
|
|
2345
|
-
obj.userOpHash = message.userOpHash;
|
|
2346
|
-
}
|
|
2347
|
-
if (message.error !== "") {
|
|
2348
|
-
obj.error = message.error;
|
|
2349
|
-
}
|
|
2350
|
-
return obj;
|
|
2351
|
-
},
|
|
2352
|
-
|
|
2353
|
-
create<I extends Exact<DeepPartial<Execution>, I>>(base?: I): Execution {
|
|
2354
|
-
return Execution.fromPartial(base ?? ({} as any));
|
|
2355
|
-
},
|
|
2356
|
-
fromPartial<I extends Exact<DeepPartial<Execution>, I>>(object: I): Execution {
|
|
2357
|
-
const message = createBaseExecution();
|
|
2358
|
-
message.epoch = object.epoch ?? 0;
|
|
2359
|
-
message.userOpHash = object.userOpHash ?? "";
|
|
2360
|
-
message.error = object.error ?? "";
|
|
2361
|
-
return message;
|
|
2362
|
-
},
|
|
2363
|
-
};
|
|
2364
|
-
|
|
2365
|
-
function createBaseTask(): Task {
|
|
2366
|
-
return {
|
|
2367
|
-
id: undefined,
|
|
2368
|
-
owner: "",
|
|
2369
|
-
smartAccountAddress: "",
|
|
2370
|
-
trigger: undefined,
|
|
2371
|
-
nodes: [],
|
|
2372
|
-
startAt: 0,
|
|
2373
|
-
expiredAt: 0,
|
|
2374
|
-
memo: "",
|
|
2375
|
-
completedAt: 0,
|
|
2376
|
-
status: 0,
|
|
2377
|
-
repeatable: false,
|
|
2378
|
-
executions: [],
|
|
2379
|
-
};
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
export const Task: MessageFns<Task> = {
|
|
2383
|
-
encode(message: Task, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2384
|
-
if (message.id !== undefined) {
|
|
2385
|
-
UUID.encode(message.id, writer.uint32(10).fork()).join();
|
|
2386
|
-
}
|
|
2387
|
-
if (message.owner !== "") {
|
|
2388
|
-
writer.uint32(18).string(message.owner);
|
|
2389
|
-
}
|
|
2390
|
-
if (message.smartAccountAddress !== "") {
|
|
2391
|
-
writer.uint32(26).string(message.smartAccountAddress);
|
|
2392
|
-
}
|
|
2393
|
-
if (message.trigger !== undefined) {
|
|
2394
|
-
TaskTrigger.encode(message.trigger, writer.uint32(34).fork()).join();
|
|
2395
|
-
}
|
|
2396
|
-
for (const v of message.nodes) {
|
|
2397
|
-
TaskAction.encode(v!, writer.uint32(42).fork()).join();
|
|
2398
|
-
}
|
|
2399
|
-
if (message.startAt !== 0) {
|
|
2400
|
-
writer.uint32(48).int64(message.startAt);
|
|
2401
|
-
}
|
|
2402
|
-
if (message.expiredAt !== 0) {
|
|
2403
|
-
writer.uint32(56).int64(message.expiredAt);
|
|
2404
|
-
}
|
|
2405
|
-
if (message.memo !== "") {
|
|
2406
|
-
writer.uint32(66).string(message.memo);
|
|
2407
|
-
}
|
|
2408
|
-
if (message.completedAt !== 0) {
|
|
2409
|
-
writer.uint32(72).int64(message.completedAt);
|
|
2410
|
-
}
|
|
2411
|
-
if (message.status !== 0) {
|
|
2412
|
-
writer.uint32(80).int32(message.status);
|
|
2413
|
-
}
|
|
2414
|
-
if (message.repeatable !== false) {
|
|
2415
|
-
writer.uint32(88).bool(message.repeatable);
|
|
2416
|
-
}
|
|
2417
|
-
for (const v of message.executions) {
|
|
2418
|
-
Execution.encode(v!, writer.uint32(98).fork()).join();
|
|
2419
|
-
}
|
|
2420
|
-
return writer;
|
|
2421
|
-
},
|
|
2422
|
-
|
|
2423
|
-
decode(input: BinaryReader | Uint8Array, length?: number): Task {
|
|
2424
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2425
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2426
|
-
const message = createBaseTask();
|
|
2427
|
-
while (reader.pos < end) {
|
|
2428
|
-
const tag = reader.uint32();
|
|
2429
|
-
switch (tag >>> 3) {
|
|
2430
|
-
case 1: {
|
|
2431
|
-
if (tag !== 10) {
|
|
2432
|
-
break;
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
message.id = UUID.decode(reader, reader.uint32());
|
|
2436
|
-
continue;
|
|
2437
|
-
}
|
|
2438
|
-
case 2: {
|
|
2439
|
-
if (tag !== 18) {
|
|
2440
|
-
break;
|
|
2441
|
-
}
|
|
2442
|
-
|
|
2443
|
-
message.owner = reader.string();
|
|
2444
|
-
continue;
|
|
2445
|
-
}
|
|
2446
|
-
case 3: {
|
|
2447
|
-
if (tag !== 26) {
|
|
2448
|
-
break;
|
|
2449
|
-
}
|
|
2450
|
-
|
|
2451
|
-
message.smartAccountAddress = reader.string();
|
|
2452
|
-
continue;
|
|
2453
|
-
}
|
|
2454
|
-
case 4: {
|
|
2455
|
-
if (tag !== 34) {
|
|
2456
|
-
break;
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
message.trigger = TaskTrigger.decode(reader, reader.uint32());
|
|
2460
|
-
continue;
|
|
2461
|
-
}
|
|
2462
|
-
case 5: {
|
|
2463
|
-
if (tag !== 42) {
|
|
2464
|
-
break;
|
|
2465
|
-
}
|
|
2466
|
-
|
|
2467
|
-
message.nodes.push(TaskAction.decode(reader, reader.uint32()));
|
|
2468
|
-
continue;
|
|
2469
|
-
}
|
|
2470
|
-
case 6: {
|
|
2471
|
-
if (tag !== 48) {
|
|
2472
|
-
break;
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
message.startAt = longToNumber(reader.int64());
|
|
2476
|
-
continue;
|
|
2477
|
-
}
|
|
2478
|
-
case 7: {
|
|
2479
|
-
if (tag !== 56) {
|
|
2480
|
-
break;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
message.expiredAt = longToNumber(reader.int64());
|
|
2484
|
-
continue;
|
|
2485
|
-
}
|
|
2486
|
-
case 8: {
|
|
2487
|
-
if (tag !== 66) {
|
|
2488
|
-
break;
|
|
2489
|
-
}
|
|
2490
|
-
|
|
2491
|
-
message.memo = reader.string();
|
|
2492
|
-
continue;
|
|
2493
|
-
}
|
|
2494
|
-
case 9: {
|
|
2495
|
-
if (tag !== 72) {
|
|
2496
|
-
break;
|
|
2497
|
-
}
|
|
2498
|
-
|
|
2499
|
-
message.completedAt = longToNumber(reader.int64());
|
|
2500
|
-
continue;
|
|
2501
|
-
}
|
|
2502
|
-
case 10: {
|
|
2503
|
-
if (tag !== 80) {
|
|
2504
|
-
break;
|
|
2505
|
-
}
|
|
2506
|
-
|
|
2507
|
-
message.status = reader.int32() as any;
|
|
2508
|
-
continue;
|
|
2509
|
-
}
|
|
2510
|
-
case 11: {
|
|
2511
|
-
if (tag !== 88) {
|
|
2512
|
-
break;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
message.repeatable = reader.bool();
|
|
2516
|
-
continue;
|
|
2517
|
-
}
|
|
2518
|
-
case 12: {
|
|
2519
|
-
if (tag !== 98) {
|
|
2520
|
-
break;
|
|
2521
|
-
}
|
|
2522
|
-
|
|
2523
|
-
message.executions.push(Execution.decode(reader, reader.uint32()));
|
|
2524
|
-
continue;
|
|
2525
|
-
}
|
|
2526
|
-
}
|
|
2527
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2528
|
-
break;
|
|
2529
|
-
}
|
|
2530
|
-
reader.skip(tag & 7);
|
|
2531
|
-
}
|
|
2532
|
-
return message;
|
|
2533
|
-
},
|
|
2534
|
-
|
|
2535
|
-
fromJSON(object: any): Task {
|
|
2536
|
-
return {
|
|
2537
|
-
id: isSet(object.id) ? UUID.fromJSON(object.id) : undefined,
|
|
2538
|
-
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
|
2539
|
-
smartAccountAddress: isSet(object.smartAccountAddress) ? globalThis.String(object.smartAccountAddress) : "",
|
|
2540
|
-
trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined,
|
|
2541
|
-
nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => TaskAction.fromJSON(e)) : [],
|
|
2542
|
-
startAt: isSet(object.startAt) ? globalThis.Number(object.startAt) : 0,
|
|
2543
|
-
expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0,
|
|
2544
|
-
memo: isSet(object.memo) ? globalThis.String(object.memo) : "",
|
|
2545
|
-
completedAt: isSet(object.completedAt) ? globalThis.Number(object.completedAt) : 0,
|
|
2546
|
-
status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0,
|
|
2547
|
-
repeatable: isSet(object.repeatable) ? globalThis.Boolean(object.repeatable) : false,
|
|
2548
|
-
executions: globalThis.Array.isArray(object?.executions)
|
|
2549
|
-
? object.executions.map((e: any) => Execution.fromJSON(e))
|
|
2550
|
-
: [],
|
|
2551
|
-
};
|
|
2552
|
-
},
|
|
2553
|
-
|
|
2554
|
-
toJSON(message: Task): unknown {
|
|
2555
|
-
const obj: any = {};
|
|
2556
|
-
if (message.id !== undefined) {
|
|
2557
|
-
obj.id = UUID.toJSON(message.id);
|
|
2558
|
-
}
|
|
2559
|
-
if (message.owner !== "") {
|
|
2560
|
-
obj.owner = message.owner;
|
|
2561
|
-
}
|
|
2562
|
-
if (message.smartAccountAddress !== "") {
|
|
2563
|
-
obj.smartAccountAddress = message.smartAccountAddress;
|
|
2564
|
-
}
|
|
2565
|
-
if (message.trigger !== undefined) {
|
|
2566
|
-
obj.trigger = TaskTrigger.toJSON(message.trigger);
|
|
2567
|
-
}
|
|
2568
|
-
if (message.nodes?.length) {
|
|
2569
|
-
obj.nodes = message.nodes.map((e) => TaskAction.toJSON(e));
|
|
2570
|
-
}
|
|
2571
|
-
if (message.startAt !== 0) {
|
|
2572
|
-
obj.startAt = Math.round(message.startAt);
|
|
2573
|
-
}
|
|
2574
|
-
if (message.expiredAt !== 0) {
|
|
2575
|
-
obj.expiredAt = Math.round(message.expiredAt);
|
|
2576
|
-
}
|
|
2577
|
-
if (message.memo !== "") {
|
|
2578
|
-
obj.memo = message.memo;
|
|
2579
|
-
}
|
|
2580
|
-
if (message.completedAt !== 0) {
|
|
2581
|
-
obj.completedAt = Math.round(message.completedAt);
|
|
2582
|
-
}
|
|
2583
|
-
if (message.status !== 0) {
|
|
2584
|
-
obj.status = taskStatusToJSON(message.status);
|
|
2585
|
-
}
|
|
2586
|
-
if (message.repeatable !== false) {
|
|
2587
|
-
obj.repeatable = message.repeatable;
|
|
2588
|
-
}
|
|
2589
|
-
if (message.executions?.length) {
|
|
2590
|
-
obj.executions = message.executions.map((e) => Execution.toJSON(e));
|
|
2591
|
-
}
|
|
2592
|
-
return obj;
|
|
2593
|
-
},
|
|
2594
|
-
|
|
2595
|
-
create<I extends Exact<DeepPartial<Task>, I>>(base?: I): Task {
|
|
2596
|
-
return Task.fromPartial(base ?? ({} as any));
|
|
2597
|
-
},
|
|
2598
|
-
fromPartial<I extends Exact<DeepPartial<Task>, I>>(object: I): Task {
|
|
2599
|
-
const message = createBaseTask();
|
|
2600
|
-
message.id = (object.id !== undefined && object.id !== null) ? UUID.fromPartial(object.id) : undefined;
|
|
2601
|
-
message.owner = object.owner ?? "";
|
|
2602
|
-
message.smartAccountAddress = object.smartAccountAddress ?? "";
|
|
2603
|
-
message.trigger = (object.trigger !== undefined && object.trigger !== null)
|
|
2604
|
-
? TaskTrigger.fromPartial(object.trigger)
|
|
2605
|
-
: undefined;
|
|
2606
|
-
message.nodes = object.nodes?.map((e) => TaskAction.fromPartial(e)) || [];
|
|
2607
|
-
message.startAt = object.startAt ?? 0;
|
|
2608
|
-
message.expiredAt = object.expiredAt ?? 0;
|
|
2609
|
-
message.memo = object.memo ?? "";
|
|
2610
|
-
message.completedAt = object.completedAt ?? 0;
|
|
2611
|
-
message.status = object.status ?? 0;
|
|
2612
|
-
message.repeatable = object.repeatable ?? false;
|
|
2613
|
-
message.executions = object.executions?.map((e) => Execution.fromPartial(e)) || [];
|
|
2614
|
-
return message;
|
|
2615
|
-
},
|
|
2616
|
-
};
|
|
2617
|
-
|
|
2618
|
-
function createBaseCreateTaskReq(): CreateTaskReq {
|
|
2619
|
-
return { trigger: undefined, actions: [], startAt: 0, expiredAt: 0, memo: "", repeatable: false };
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
export const CreateTaskReq: MessageFns<CreateTaskReq> = {
|
|
2623
|
-
encode(message: CreateTaskReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2624
|
-
if (message.trigger !== undefined) {
|
|
2625
|
-
TaskTrigger.encode(message.trigger, writer.uint32(10).fork()).join();
|
|
2626
|
-
}
|
|
2627
|
-
for (const v of message.actions) {
|
|
2628
|
-
TaskAction.encode(v!, writer.uint32(18).fork()).join();
|
|
2629
|
-
}
|
|
2630
|
-
if (message.startAt !== 0) {
|
|
2631
|
-
writer.uint32(24).int64(message.startAt);
|
|
2632
|
-
}
|
|
2633
|
-
if (message.expiredAt !== 0) {
|
|
2634
|
-
writer.uint32(32).int64(message.expiredAt);
|
|
2635
|
-
}
|
|
2636
|
-
if (message.memo !== "") {
|
|
2637
|
-
writer.uint32(42).string(message.memo);
|
|
2638
|
-
}
|
|
2639
|
-
if (message.repeatable !== false) {
|
|
2640
|
-
writer.uint32(48).bool(message.repeatable);
|
|
2641
|
-
}
|
|
2642
|
-
return writer;
|
|
2643
|
-
},
|
|
2644
|
-
|
|
2645
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateTaskReq {
|
|
2646
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2647
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2648
|
-
const message = createBaseCreateTaskReq();
|
|
2649
|
-
while (reader.pos < end) {
|
|
2650
|
-
const tag = reader.uint32();
|
|
2651
|
-
switch (tag >>> 3) {
|
|
2652
|
-
case 1: {
|
|
2653
|
-
if (tag !== 10) {
|
|
2654
|
-
break;
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
message.trigger = TaskTrigger.decode(reader, reader.uint32());
|
|
2658
|
-
continue;
|
|
2659
|
-
}
|
|
2660
|
-
case 2: {
|
|
2661
|
-
if (tag !== 18) {
|
|
2662
|
-
break;
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
message.actions.push(TaskAction.decode(reader, reader.uint32()));
|
|
2666
|
-
continue;
|
|
2667
|
-
}
|
|
2668
|
-
case 3: {
|
|
2669
|
-
if (tag !== 24) {
|
|
2670
|
-
break;
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
message.startAt = longToNumber(reader.int64());
|
|
2674
|
-
continue;
|
|
2675
|
-
}
|
|
2676
|
-
case 4: {
|
|
2677
|
-
if (tag !== 32) {
|
|
2678
|
-
break;
|
|
2679
|
-
}
|
|
2680
|
-
|
|
2681
|
-
message.expiredAt = longToNumber(reader.int64());
|
|
2682
|
-
continue;
|
|
2683
|
-
}
|
|
2684
|
-
case 5: {
|
|
2685
|
-
if (tag !== 42) {
|
|
2686
|
-
break;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
|
-
message.memo = reader.string();
|
|
2690
|
-
continue;
|
|
2691
|
-
}
|
|
2692
|
-
case 6: {
|
|
2693
|
-
if (tag !== 48) {
|
|
2694
|
-
break;
|
|
2695
|
-
}
|
|
2696
|
-
|
|
2697
|
-
message.repeatable = reader.bool();
|
|
2698
|
-
continue;
|
|
2699
|
-
}
|
|
2700
|
-
}
|
|
2701
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2702
|
-
break;
|
|
2703
|
-
}
|
|
2704
|
-
reader.skip(tag & 7);
|
|
2705
|
-
}
|
|
2706
|
-
return message;
|
|
2707
|
-
},
|
|
2708
|
-
|
|
2709
|
-
fromJSON(object: any): CreateTaskReq {
|
|
2710
|
-
return {
|
|
2711
|
-
trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined,
|
|
2712
|
-
actions: globalThis.Array.isArray(object?.actions) ? object.actions.map((e: any) => TaskAction.fromJSON(e)) : [],
|
|
2713
|
-
startAt: isSet(object.startAt) ? globalThis.Number(object.startAt) : 0,
|
|
2714
|
-
expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0,
|
|
2715
|
-
memo: isSet(object.memo) ? globalThis.String(object.memo) : "",
|
|
2716
|
-
repeatable: isSet(object.repeatable) ? globalThis.Boolean(object.repeatable) : false,
|
|
2717
|
-
};
|
|
2718
|
-
},
|
|
2719
|
-
|
|
2720
|
-
toJSON(message: CreateTaskReq): unknown {
|
|
2721
|
-
const obj: any = {};
|
|
2722
|
-
if (message.trigger !== undefined) {
|
|
2723
|
-
obj.trigger = TaskTrigger.toJSON(message.trigger);
|
|
2724
|
-
}
|
|
2725
|
-
if (message.actions?.length) {
|
|
2726
|
-
obj.actions = message.actions.map((e) => TaskAction.toJSON(e));
|
|
2727
|
-
}
|
|
2728
|
-
if (message.startAt !== 0) {
|
|
2729
|
-
obj.startAt = Math.round(message.startAt);
|
|
2730
|
-
}
|
|
2731
|
-
if (message.expiredAt !== 0) {
|
|
2732
|
-
obj.expiredAt = Math.round(message.expiredAt);
|
|
2733
|
-
}
|
|
2734
|
-
if (message.memo !== "") {
|
|
2735
|
-
obj.memo = message.memo;
|
|
2736
|
-
}
|
|
2737
|
-
if (message.repeatable !== false) {
|
|
2738
|
-
obj.repeatable = message.repeatable;
|
|
2739
|
-
}
|
|
2740
|
-
return obj;
|
|
2741
|
-
},
|
|
2742
|
-
|
|
2743
|
-
create<I extends Exact<DeepPartial<CreateTaskReq>, I>>(base?: I): CreateTaskReq {
|
|
2744
|
-
return CreateTaskReq.fromPartial(base ?? ({} as any));
|
|
2745
|
-
},
|
|
2746
|
-
fromPartial<I extends Exact<DeepPartial<CreateTaskReq>, I>>(object: I): CreateTaskReq {
|
|
2747
|
-
const message = createBaseCreateTaskReq();
|
|
2748
|
-
message.trigger = (object.trigger !== undefined && object.trigger !== null)
|
|
2749
|
-
? TaskTrigger.fromPartial(object.trigger)
|
|
2750
|
-
: undefined;
|
|
2751
|
-
message.actions = object.actions?.map((e) => TaskAction.fromPartial(e)) || [];
|
|
2752
|
-
message.startAt = object.startAt ?? 0;
|
|
2753
|
-
message.expiredAt = object.expiredAt ?? 0;
|
|
2754
|
-
message.memo = object.memo ?? "";
|
|
2755
|
-
message.repeatable = object.repeatable ?? false;
|
|
2756
|
-
return message;
|
|
2757
|
-
},
|
|
2758
|
-
};
|
|
2759
|
-
|
|
2760
|
-
function createBaseCreateTaskResp(): CreateTaskResp {
|
|
2761
|
-
return { id: "" };
|
|
2762
|
-
}
|
|
2763
|
-
|
|
2764
|
-
export const CreateTaskResp: MessageFns<CreateTaskResp> = {
|
|
2765
|
-
encode(message: CreateTaskResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2766
|
-
if (message.id !== "") {
|
|
2767
|
-
writer.uint32(10).string(message.id);
|
|
2768
|
-
}
|
|
2769
|
-
return writer;
|
|
2770
|
-
},
|
|
2771
|
-
|
|
2772
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateTaskResp {
|
|
2773
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2774
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2775
|
-
const message = createBaseCreateTaskResp();
|
|
2776
|
-
while (reader.pos < end) {
|
|
2777
|
-
const tag = reader.uint32();
|
|
2778
|
-
switch (tag >>> 3) {
|
|
2779
|
-
case 1: {
|
|
2780
|
-
if (tag !== 10) {
|
|
2781
|
-
break;
|
|
2782
|
-
}
|
|
2783
|
-
|
|
2784
|
-
message.id = reader.string();
|
|
2785
|
-
continue;
|
|
2786
|
-
}
|
|
2787
|
-
}
|
|
2788
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2789
|
-
break;
|
|
2790
|
-
}
|
|
2791
|
-
reader.skip(tag & 7);
|
|
2792
|
-
}
|
|
2793
|
-
return message;
|
|
2794
|
-
},
|
|
2795
|
-
|
|
2796
|
-
fromJSON(object: any): CreateTaskResp {
|
|
2797
|
-
return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
|
|
2798
|
-
},
|
|
2799
|
-
|
|
2800
|
-
toJSON(message: CreateTaskResp): unknown {
|
|
2801
|
-
const obj: any = {};
|
|
2802
|
-
if (message.id !== "") {
|
|
2803
|
-
obj.id = message.id;
|
|
2804
|
-
}
|
|
2805
|
-
return obj;
|
|
2806
|
-
},
|
|
2807
|
-
|
|
2808
|
-
create<I extends Exact<DeepPartial<CreateTaskResp>, I>>(base?: I): CreateTaskResp {
|
|
2809
|
-
return CreateTaskResp.fromPartial(base ?? ({} as any));
|
|
2810
|
-
},
|
|
2811
|
-
fromPartial<I extends Exact<DeepPartial<CreateTaskResp>, I>>(object: I): CreateTaskResp {
|
|
2812
|
-
const message = createBaseCreateTaskResp();
|
|
2813
|
-
message.id = object.id ?? "";
|
|
2814
|
-
return message;
|
|
2815
|
-
},
|
|
2816
|
-
};
|
|
2817
|
-
|
|
2818
|
-
function createBaseNonceRequest(): NonceRequest {
|
|
2819
|
-
return { owner: "" };
|
|
2820
|
-
}
|
|
2821
|
-
|
|
2822
|
-
export const NonceRequest: MessageFns<NonceRequest> = {
|
|
2823
|
-
encode(message: NonceRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2824
|
-
if (message.owner !== "") {
|
|
2825
|
-
writer.uint32(10).string(message.owner);
|
|
2826
|
-
}
|
|
2827
|
-
return writer;
|
|
2828
|
-
},
|
|
2829
|
-
|
|
2830
|
-
decode(input: BinaryReader | Uint8Array, length?: number): NonceRequest {
|
|
2831
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2832
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2833
|
-
const message = createBaseNonceRequest();
|
|
2834
|
-
while (reader.pos < end) {
|
|
2835
|
-
const tag = reader.uint32();
|
|
2836
|
-
switch (tag >>> 3) {
|
|
2837
|
-
case 1: {
|
|
2838
|
-
if (tag !== 10) {
|
|
2839
|
-
break;
|
|
2840
|
-
}
|
|
2841
|
-
|
|
2842
|
-
message.owner = reader.string();
|
|
2843
|
-
continue;
|
|
2844
|
-
}
|
|
2845
|
-
}
|
|
2846
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2847
|
-
break;
|
|
2848
|
-
}
|
|
2849
|
-
reader.skip(tag & 7);
|
|
2850
|
-
}
|
|
2851
|
-
return message;
|
|
2852
|
-
},
|
|
2853
|
-
|
|
2854
|
-
fromJSON(object: any): NonceRequest {
|
|
2855
|
-
return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" };
|
|
2856
|
-
},
|
|
2857
|
-
|
|
2858
|
-
toJSON(message: NonceRequest): unknown {
|
|
2859
|
-
const obj: any = {};
|
|
2860
|
-
if (message.owner !== "") {
|
|
2861
|
-
obj.owner = message.owner;
|
|
2862
|
-
}
|
|
2863
|
-
return obj;
|
|
2864
|
-
},
|
|
2865
|
-
|
|
2866
|
-
create<I extends Exact<DeepPartial<NonceRequest>, I>>(base?: I): NonceRequest {
|
|
2867
|
-
return NonceRequest.fromPartial(base ?? ({} as any));
|
|
2868
|
-
},
|
|
2869
|
-
fromPartial<I extends Exact<DeepPartial<NonceRequest>, I>>(object: I): NonceRequest {
|
|
2870
|
-
const message = createBaseNonceRequest();
|
|
2871
|
-
message.owner = object.owner ?? "";
|
|
2872
|
-
return message;
|
|
2873
|
-
},
|
|
2874
|
-
};
|
|
2875
|
-
|
|
2876
|
-
function createBaseNonceResp(): NonceResp {
|
|
2877
|
-
return { nonce: "" };
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
|
-
export const NonceResp: MessageFns<NonceResp> = {
|
|
2881
|
-
encode(message: NonceResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2882
|
-
if (message.nonce !== "") {
|
|
2883
|
-
writer.uint32(10).string(message.nonce);
|
|
2884
|
-
}
|
|
2885
|
-
return writer;
|
|
2886
|
-
},
|
|
2887
|
-
|
|
2888
|
-
decode(input: BinaryReader | Uint8Array, length?: number): NonceResp {
|
|
2889
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2890
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2891
|
-
const message = createBaseNonceResp();
|
|
2892
|
-
while (reader.pos < end) {
|
|
2893
|
-
const tag = reader.uint32();
|
|
2894
|
-
switch (tag >>> 3) {
|
|
2895
|
-
case 1: {
|
|
2896
|
-
if (tag !== 10) {
|
|
2897
|
-
break;
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
message.nonce = reader.string();
|
|
2901
|
-
continue;
|
|
2902
|
-
}
|
|
2903
|
-
}
|
|
2904
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2905
|
-
break;
|
|
2906
|
-
}
|
|
2907
|
-
reader.skip(tag & 7);
|
|
2908
|
-
}
|
|
2909
|
-
return message;
|
|
2910
|
-
},
|
|
2911
|
-
|
|
2912
|
-
fromJSON(object: any): NonceResp {
|
|
2913
|
-
return { nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "" };
|
|
2914
|
-
},
|
|
2915
|
-
|
|
2916
|
-
toJSON(message: NonceResp): unknown {
|
|
2917
|
-
const obj: any = {};
|
|
2918
|
-
if (message.nonce !== "") {
|
|
2919
|
-
obj.nonce = message.nonce;
|
|
2920
|
-
}
|
|
2921
|
-
return obj;
|
|
2922
|
-
},
|
|
2923
|
-
|
|
2924
|
-
create<I extends Exact<DeepPartial<NonceResp>, I>>(base?: I): NonceResp {
|
|
2925
|
-
return NonceResp.fromPartial(base ?? ({} as any));
|
|
2926
|
-
},
|
|
2927
|
-
fromPartial<I extends Exact<DeepPartial<NonceResp>, I>>(object: I): NonceResp {
|
|
2928
|
-
const message = createBaseNonceResp();
|
|
2929
|
-
message.nonce = object.nonce ?? "";
|
|
2930
|
-
return message;
|
|
2931
|
-
},
|
|
2932
|
-
};
|
|
2933
|
-
|
|
2934
|
-
function createBaseAddressRequest(): AddressRequest {
|
|
2935
|
-
return { owner: "" };
|
|
2936
|
-
}
|
|
2937
|
-
|
|
2938
|
-
export const AddressRequest: MessageFns<AddressRequest> = {
|
|
2939
|
-
encode(message: AddressRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2940
|
-
if (message.owner !== "") {
|
|
2941
|
-
writer.uint32(10).string(message.owner);
|
|
2942
|
-
}
|
|
2943
|
-
return writer;
|
|
2944
|
-
},
|
|
2945
|
-
|
|
2946
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AddressRequest {
|
|
2947
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2948
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2949
|
-
const message = createBaseAddressRequest();
|
|
2950
|
-
while (reader.pos < end) {
|
|
2951
|
-
const tag = reader.uint32();
|
|
2952
|
-
switch (tag >>> 3) {
|
|
2953
|
-
case 1: {
|
|
2954
|
-
if (tag !== 10) {
|
|
2955
|
-
break;
|
|
2956
|
-
}
|
|
2957
|
-
|
|
2958
|
-
message.owner = reader.string();
|
|
2959
|
-
continue;
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2963
|
-
break;
|
|
2964
|
-
}
|
|
2965
|
-
reader.skip(tag & 7);
|
|
2966
|
-
}
|
|
2967
|
-
return message;
|
|
2968
|
-
},
|
|
2969
|
-
|
|
2970
|
-
fromJSON(object: any): AddressRequest {
|
|
2971
|
-
return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" };
|
|
2972
|
-
},
|
|
2973
|
-
|
|
2974
|
-
toJSON(message: AddressRequest): unknown {
|
|
2975
|
-
const obj: any = {};
|
|
2976
|
-
if (message.owner !== "") {
|
|
2977
|
-
obj.owner = message.owner;
|
|
2978
|
-
}
|
|
2979
|
-
return obj;
|
|
2980
|
-
},
|
|
2981
|
-
|
|
2982
|
-
create<I extends Exact<DeepPartial<AddressRequest>, I>>(base?: I): AddressRequest {
|
|
2983
|
-
return AddressRequest.fromPartial(base ?? ({} as any));
|
|
2984
|
-
},
|
|
2985
|
-
fromPartial<I extends Exact<DeepPartial<AddressRequest>, I>>(object: I): AddressRequest {
|
|
2986
|
-
const message = createBaseAddressRequest();
|
|
2987
|
-
message.owner = object.owner ?? "";
|
|
2988
|
-
return message;
|
|
2989
|
-
},
|
|
2990
|
-
};
|
|
2991
|
-
|
|
2992
|
-
function createBaseAddressResp(): AddressResp {
|
|
2993
|
-
return { smartAccountAddress: "", nonce: "" };
|
|
2994
|
-
}
|
|
2995
|
-
|
|
2996
|
-
export const AddressResp: MessageFns<AddressResp> = {
|
|
2997
|
-
encode(message: AddressResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2998
|
-
if (message.smartAccountAddress !== "") {
|
|
2999
|
-
writer.uint32(10).string(message.smartAccountAddress);
|
|
3000
|
-
}
|
|
3001
|
-
if (message.nonce !== "") {
|
|
3002
|
-
writer.uint32(18).string(message.nonce);
|
|
3003
|
-
}
|
|
3004
|
-
return writer;
|
|
3005
|
-
},
|
|
3006
|
-
|
|
3007
|
-
decode(input: BinaryReader | Uint8Array, length?: number): AddressResp {
|
|
3008
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3009
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3010
|
-
const message = createBaseAddressResp();
|
|
3011
|
-
while (reader.pos < end) {
|
|
3012
|
-
const tag = reader.uint32();
|
|
3013
|
-
switch (tag >>> 3) {
|
|
3014
|
-
case 1: {
|
|
3015
|
-
if (tag !== 10) {
|
|
3016
|
-
break;
|
|
3017
|
-
}
|
|
3018
|
-
|
|
3019
|
-
message.smartAccountAddress = reader.string();
|
|
3020
|
-
continue;
|
|
3021
|
-
}
|
|
3022
|
-
case 2: {
|
|
3023
|
-
if (tag !== 18) {
|
|
3024
|
-
break;
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
message.nonce = reader.string();
|
|
3028
|
-
continue;
|
|
3029
|
-
}
|
|
3030
|
-
}
|
|
3031
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3032
|
-
break;
|
|
3033
|
-
}
|
|
3034
|
-
reader.skip(tag & 7);
|
|
3035
|
-
}
|
|
3036
|
-
return message;
|
|
3037
|
-
},
|
|
3038
|
-
|
|
3039
|
-
fromJSON(object: any): AddressResp {
|
|
3040
|
-
return {
|
|
3041
|
-
smartAccountAddress: isSet(object.smartAccountAddress) ? globalThis.String(object.smartAccountAddress) : "",
|
|
3042
|
-
nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "",
|
|
3043
|
-
};
|
|
3044
|
-
},
|
|
3045
|
-
|
|
3046
|
-
toJSON(message: AddressResp): unknown {
|
|
3047
|
-
const obj: any = {};
|
|
3048
|
-
if (message.smartAccountAddress !== "") {
|
|
3049
|
-
obj.smartAccountAddress = message.smartAccountAddress;
|
|
3050
|
-
}
|
|
3051
|
-
if (message.nonce !== "") {
|
|
3052
|
-
obj.nonce = message.nonce;
|
|
3053
|
-
}
|
|
3054
|
-
return obj;
|
|
3055
|
-
},
|
|
3056
|
-
|
|
3057
|
-
create<I extends Exact<DeepPartial<AddressResp>, I>>(base?: I): AddressResp {
|
|
3058
|
-
return AddressResp.fromPartial(base ?? ({} as any));
|
|
3059
|
-
},
|
|
3060
|
-
fromPartial<I extends Exact<DeepPartial<AddressResp>, I>>(object: I): AddressResp {
|
|
3061
|
-
const message = createBaseAddressResp();
|
|
3062
|
-
message.smartAccountAddress = object.smartAccountAddress ?? "";
|
|
3063
|
-
message.nonce = object.nonce ?? "";
|
|
3064
|
-
return message;
|
|
3065
|
-
},
|
|
3066
|
-
};
|
|
3067
|
-
|
|
3068
|
-
function createBaseListTasksReq(): ListTasksReq {
|
|
3069
|
-
return {};
|
|
3070
|
-
}
|
|
3071
|
-
|
|
3072
|
-
export const ListTasksReq: MessageFns<ListTasksReq> = {
|
|
3073
|
-
encode(_: ListTasksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3074
|
-
return writer;
|
|
3075
|
-
},
|
|
3076
|
-
|
|
3077
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListTasksReq {
|
|
3078
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3079
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3080
|
-
const message = createBaseListTasksReq();
|
|
3081
|
-
while (reader.pos < end) {
|
|
3082
|
-
const tag = reader.uint32();
|
|
3083
|
-
switch (tag >>> 3) {
|
|
3084
|
-
}
|
|
3085
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3086
|
-
break;
|
|
3087
|
-
}
|
|
3088
|
-
reader.skip(tag & 7);
|
|
3089
|
-
}
|
|
3090
|
-
return message;
|
|
3091
|
-
},
|
|
3092
|
-
|
|
3093
|
-
fromJSON(_: any): ListTasksReq {
|
|
3094
|
-
return {};
|
|
3095
|
-
},
|
|
3096
|
-
|
|
3097
|
-
toJSON(_: ListTasksReq): unknown {
|
|
3098
|
-
const obj: any = {};
|
|
3099
|
-
return obj;
|
|
3100
|
-
},
|
|
3101
|
-
|
|
3102
|
-
create<I extends Exact<DeepPartial<ListTasksReq>, I>>(base?: I): ListTasksReq {
|
|
3103
|
-
return ListTasksReq.fromPartial(base ?? ({} as any));
|
|
3104
|
-
},
|
|
3105
|
-
fromPartial<I extends Exact<DeepPartial<ListTasksReq>, I>>(_: I): ListTasksReq {
|
|
3106
|
-
const message = createBaseListTasksReq();
|
|
3107
|
-
return message;
|
|
3108
|
-
},
|
|
3109
|
-
};
|
|
3110
|
-
|
|
3111
|
-
function createBaseListTasksResp(): ListTasksResp {
|
|
3112
|
-
return { tasks: [] };
|
|
3113
|
-
}
|
|
3114
|
-
|
|
3115
|
-
export const ListTasksResp: MessageFns<ListTasksResp> = {
|
|
3116
|
-
encode(message: ListTasksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3117
|
-
for (const v of message.tasks) {
|
|
3118
|
-
ListTasksResp_TaskItemResp.encode(v!, writer.uint32(10).fork()).join();
|
|
3119
|
-
}
|
|
3120
|
-
return writer;
|
|
3121
|
-
},
|
|
3122
|
-
|
|
3123
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListTasksResp {
|
|
3124
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3125
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3126
|
-
const message = createBaseListTasksResp();
|
|
3127
|
-
while (reader.pos < end) {
|
|
3128
|
-
const tag = reader.uint32();
|
|
3129
|
-
switch (tag >>> 3) {
|
|
3130
|
-
case 1: {
|
|
3131
|
-
if (tag !== 10) {
|
|
3132
|
-
break;
|
|
3133
|
-
}
|
|
3134
|
-
|
|
3135
|
-
message.tasks.push(ListTasksResp_TaskItemResp.decode(reader, reader.uint32()));
|
|
3136
|
-
continue;
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3140
|
-
break;
|
|
3141
|
-
}
|
|
3142
|
-
reader.skip(tag & 7);
|
|
3143
|
-
}
|
|
3144
|
-
return message;
|
|
3145
|
-
},
|
|
3146
|
-
|
|
3147
|
-
fromJSON(object: any): ListTasksResp {
|
|
3148
|
-
return {
|
|
3149
|
-
tasks: globalThis.Array.isArray(object?.tasks)
|
|
3150
|
-
? object.tasks.map((e: any) => ListTasksResp_TaskItemResp.fromJSON(e))
|
|
3151
|
-
: [],
|
|
3152
|
-
};
|
|
3153
|
-
},
|
|
3154
|
-
|
|
3155
|
-
toJSON(message: ListTasksResp): unknown {
|
|
3156
|
-
const obj: any = {};
|
|
3157
|
-
if (message.tasks?.length) {
|
|
3158
|
-
obj.tasks = message.tasks.map((e) => ListTasksResp_TaskItemResp.toJSON(e));
|
|
3159
|
-
}
|
|
3160
|
-
return obj;
|
|
3161
|
-
},
|
|
3162
|
-
|
|
3163
|
-
create<I extends Exact<DeepPartial<ListTasksResp>, I>>(base?: I): ListTasksResp {
|
|
3164
|
-
return ListTasksResp.fromPartial(base ?? ({} as any));
|
|
3165
|
-
},
|
|
3166
|
-
fromPartial<I extends Exact<DeepPartial<ListTasksResp>, I>>(object: I): ListTasksResp {
|
|
3167
|
-
const message = createBaseListTasksResp();
|
|
3168
|
-
message.tasks = object.tasks?.map((e) => ListTasksResp_TaskItemResp.fromPartial(e)) || [];
|
|
3169
|
-
return message;
|
|
3170
|
-
},
|
|
3171
|
-
};
|
|
3172
|
-
|
|
3173
|
-
function createBaseListTasksResp_TaskItemResp(): ListTasksResp_TaskItemResp {
|
|
3174
|
-
return { id: "", status: 0 };
|
|
3175
|
-
}
|
|
3176
|
-
|
|
3177
|
-
export const ListTasksResp_TaskItemResp: MessageFns<ListTasksResp_TaskItemResp> = {
|
|
3178
|
-
encode(message: ListTasksResp_TaskItemResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3179
|
-
if (message.id !== "") {
|
|
3180
|
-
writer.uint32(10).string(message.id);
|
|
3181
|
-
}
|
|
3182
|
-
if (message.status !== 0) {
|
|
3183
|
-
writer.uint32(16).int32(message.status);
|
|
3184
|
-
}
|
|
3185
|
-
return writer;
|
|
3186
|
-
},
|
|
3187
|
-
|
|
3188
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListTasksResp_TaskItemResp {
|
|
3189
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3190
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3191
|
-
const message = createBaseListTasksResp_TaskItemResp();
|
|
3192
|
-
while (reader.pos < end) {
|
|
3193
|
-
const tag = reader.uint32();
|
|
3194
|
-
switch (tag >>> 3) {
|
|
3195
|
-
case 1: {
|
|
3196
|
-
if (tag !== 10) {
|
|
3197
|
-
break;
|
|
3198
|
-
}
|
|
3199
|
-
|
|
3200
|
-
message.id = reader.string();
|
|
3201
|
-
continue;
|
|
3202
|
-
}
|
|
3203
|
-
case 2: {
|
|
3204
|
-
if (tag !== 16) {
|
|
3205
|
-
break;
|
|
3206
|
-
}
|
|
3207
|
-
|
|
3208
|
-
message.status = reader.int32() as any;
|
|
3209
|
-
continue;
|
|
3210
|
-
}
|
|
3211
|
-
}
|
|
3212
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3213
|
-
break;
|
|
3214
|
-
}
|
|
3215
|
-
reader.skip(tag & 7);
|
|
3216
|
-
}
|
|
3217
|
-
return message;
|
|
3218
|
-
},
|
|
3219
|
-
|
|
3220
|
-
fromJSON(object: any): ListTasksResp_TaskItemResp {
|
|
3221
|
-
return {
|
|
3222
|
-
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
3223
|
-
status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0,
|
|
3224
|
-
};
|
|
3225
|
-
},
|
|
3226
|
-
|
|
3227
|
-
toJSON(message: ListTasksResp_TaskItemResp): unknown {
|
|
3228
|
-
const obj: any = {};
|
|
3229
|
-
if (message.id !== "") {
|
|
3230
|
-
obj.id = message.id;
|
|
3231
|
-
}
|
|
3232
|
-
if (message.status !== 0) {
|
|
3233
|
-
obj.status = taskStatusToJSON(message.status);
|
|
3234
|
-
}
|
|
3235
|
-
return obj;
|
|
3236
|
-
},
|
|
3237
|
-
|
|
3238
|
-
create<I extends Exact<DeepPartial<ListTasksResp_TaskItemResp>, I>>(base?: I): ListTasksResp_TaskItemResp {
|
|
3239
|
-
return ListTasksResp_TaskItemResp.fromPartial(base ?? ({} as any));
|
|
3240
|
-
},
|
|
3241
|
-
fromPartial<I extends Exact<DeepPartial<ListTasksResp_TaskItemResp>, I>>(object: I): ListTasksResp_TaskItemResp {
|
|
3242
|
-
const message = createBaseListTasksResp_TaskItemResp();
|
|
3243
|
-
message.id = object.id ?? "";
|
|
3244
|
-
message.status = object.status ?? 0;
|
|
3245
|
-
return message;
|
|
3246
|
-
},
|
|
3247
|
-
};
|
|
3248
|
-
|
|
3249
|
-
function createBaseGetKeyReq(): GetKeyReq {
|
|
3250
|
-
return { owner: "", expiredAt: 0, signature: "" };
|
|
3251
|
-
}
|
|
3252
|
-
|
|
3253
|
-
export const GetKeyReq: MessageFns<GetKeyReq> = {
|
|
3254
|
-
encode(message: GetKeyReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3255
|
-
if (message.owner !== "") {
|
|
3256
|
-
writer.uint32(10).string(message.owner);
|
|
3257
|
-
}
|
|
3258
|
-
if (message.expiredAt !== 0) {
|
|
3259
|
-
writer.uint32(16).int64(message.expiredAt);
|
|
3260
|
-
}
|
|
3261
|
-
if (message.signature !== "") {
|
|
3262
|
-
writer.uint32(26).string(message.signature);
|
|
3263
|
-
}
|
|
3264
|
-
return writer;
|
|
3265
|
-
},
|
|
3266
|
-
|
|
3267
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GetKeyReq {
|
|
3268
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3269
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3270
|
-
const message = createBaseGetKeyReq();
|
|
3271
|
-
while (reader.pos < end) {
|
|
3272
|
-
const tag = reader.uint32();
|
|
3273
|
-
switch (tag >>> 3) {
|
|
3274
|
-
case 1: {
|
|
3275
|
-
if (tag !== 10) {
|
|
3276
|
-
break;
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
message.owner = reader.string();
|
|
3280
|
-
continue;
|
|
3281
|
-
}
|
|
3282
|
-
case 2: {
|
|
3283
|
-
if (tag !== 16) {
|
|
3284
|
-
break;
|
|
3285
|
-
}
|
|
3286
|
-
|
|
3287
|
-
message.expiredAt = longToNumber(reader.int64());
|
|
3288
|
-
continue;
|
|
3289
|
-
}
|
|
3290
|
-
case 3: {
|
|
3291
|
-
if (tag !== 26) {
|
|
3292
|
-
break;
|
|
3293
|
-
}
|
|
3294
|
-
|
|
3295
|
-
message.signature = reader.string();
|
|
3296
|
-
continue;
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3300
|
-
break;
|
|
3301
|
-
}
|
|
3302
|
-
reader.skip(tag & 7);
|
|
3303
|
-
}
|
|
3304
|
-
return message;
|
|
3305
|
-
},
|
|
3306
|
-
|
|
3307
|
-
fromJSON(object: any): GetKeyReq {
|
|
3308
|
-
return {
|
|
3309
|
-
owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
|
|
3310
|
-
expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0,
|
|
3311
|
-
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
3312
|
-
};
|
|
3313
|
-
},
|
|
3314
|
-
|
|
3315
|
-
toJSON(message: GetKeyReq): unknown {
|
|
3316
|
-
const obj: any = {};
|
|
3317
|
-
if (message.owner !== "") {
|
|
3318
|
-
obj.owner = message.owner;
|
|
3319
|
-
}
|
|
3320
|
-
if (message.expiredAt !== 0) {
|
|
3321
|
-
obj.expiredAt = Math.round(message.expiredAt);
|
|
3322
|
-
}
|
|
3323
|
-
if (message.signature !== "") {
|
|
3324
|
-
obj.signature = message.signature;
|
|
3325
|
-
}
|
|
3326
|
-
return obj;
|
|
3327
|
-
},
|
|
3328
|
-
|
|
3329
|
-
create<I extends Exact<DeepPartial<GetKeyReq>, I>>(base?: I): GetKeyReq {
|
|
3330
|
-
return GetKeyReq.fromPartial(base ?? ({} as any));
|
|
3331
|
-
},
|
|
3332
|
-
fromPartial<I extends Exact<DeepPartial<GetKeyReq>, I>>(object: I): GetKeyReq {
|
|
3333
|
-
const message = createBaseGetKeyReq();
|
|
3334
|
-
message.owner = object.owner ?? "";
|
|
3335
|
-
message.expiredAt = object.expiredAt ?? 0;
|
|
3336
|
-
message.signature = object.signature ?? "";
|
|
3337
|
-
return message;
|
|
3338
|
-
},
|
|
3339
|
-
};
|
|
3340
|
-
|
|
3341
|
-
function createBaseKeyResp(): KeyResp {
|
|
3342
|
-
return { key: "" };
|
|
3343
|
-
}
|
|
3344
|
-
|
|
3345
|
-
export const KeyResp: MessageFns<KeyResp> = {
|
|
3346
|
-
encode(message: KeyResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3347
|
-
if (message.key !== "") {
|
|
3348
|
-
writer.uint32(10).string(message.key);
|
|
3349
|
-
}
|
|
3350
|
-
return writer;
|
|
3351
|
-
},
|
|
3352
|
-
|
|
3353
|
-
decode(input: BinaryReader | Uint8Array, length?: number): KeyResp {
|
|
3354
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3355
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3356
|
-
const message = createBaseKeyResp();
|
|
3357
|
-
while (reader.pos < end) {
|
|
3358
|
-
const tag = reader.uint32();
|
|
3359
|
-
switch (tag >>> 3) {
|
|
3360
|
-
case 1: {
|
|
3361
|
-
if (tag !== 10) {
|
|
3362
|
-
break;
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3365
|
-
message.key = reader.string();
|
|
3366
|
-
continue;
|
|
3367
|
-
}
|
|
3368
|
-
}
|
|
3369
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3370
|
-
break;
|
|
3371
|
-
}
|
|
3372
|
-
reader.skip(tag & 7);
|
|
3373
|
-
}
|
|
3374
|
-
return message;
|
|
3375
|
-
},
|
|
3376
|
-
|
|
3377
|
-
fromJSON(object: any): KeyResp {
|
|
3378
|
-
return { key: isSet(object.key) ? globalThis.String(object.key) : "" };
|
|
3379
|
-
},
|
|
3380
|
-
|
|
3381
|
-
toJSON(message: KeyResp): unknown {
|
|
3382
|
-
const obj: any = {};
|
|
3383
|
-
if (message.key !== "") {
|
|
3384
|
-
obj.key = message.key;
|
|
3385
|
-
}
|
|
3386
|
-
return obj;
|
|
3387
|
-
},
|
|
3388
|
-
|
|
3389
|
-
create<I extends Exact<DeepPartial<KeyResp>, I>>(base?: I): KeyResp {
|
|
3390
|
-
return KeyResp.fromPartial(base ?? ({} as any));
|
|
3391
|
-
},
|
|
3392
|
-
fromPartial<I extends Exact<DeepPartial<KeyResp>, I>>(object: I): KeyResp {
|
|
3393
|
-
const message = createBaseKeyResp();
|
|
3394
|
-
message.key = object.key ?? "";
|
|
3395
|
-
return message;
|
|
3396
|
-
},
|
|
3397
|
-
};
|
|
3398
|
-
|
|
3399
|
-
function createBaseUpdateChecksReq(): UpdateChecksReq {
|
|
3400
|
-
return { address: "", signature: "", id: [] };
|
|
3401
|
-
}
|
|
3402
|
-
|
|
3403
|
-
export const UpdateChecksReq: MessageFns<UpdateChecksReq> = {
|
|
3404
|
-
encode(message: UpdateChecksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3405
|
-
if (message.address !== "") {
|
|
3406
|
-
writer.uint32(10).string(message.address);
|
|
3407
|
-
}
|
|
3408
|
-
if (message.signature !== "") {
|
|
3409
|
-
writer.uint32(18).string(message.signature);
|
|
3410
|
-
}
|
|
3411
|
-
for (const v of message.id) {
|
|
3412
|
-
writer.uint32(26).string(v!);
|
|
3413
|
-
}
|
|
3414
|
-
return writer;
|
|
3415
|
-
},
|
|
3416
|
-
|
|
3417
|
-
decode(input: BinaryReader | Uint8Array, length?: number): UpdateChecksReq {
|
|
3418
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3419
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3420
|
-
const message = createBaseUpdateChecksReq();
|
|
3421
|
-
while (reader.pos < end) {
|
|
3422
|
-
const tag = reader.uint32();
|
|
3423
|
-
switch (tag >>> 3) {
|
|
3424
|
-
case 1: {
|
|
3425
|
-
if (tag !== 10) {
|
|
3426
|
-
break;
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
message.address = reader.string();
|
|
3430
|
-
continue;
|
|
3431
|
-
}
|
|
3432
|
-
case 2: {
|
|
3433
|
-
if (tag !== 18) {
|
|
3434
|
-
break;
|
|
3435
|
-
}
|
|
3436
|
-
|
|
3437
|
-
message.signature = reader.string();
|
|
3438
|
-
continue;
|
|
3439
|
-
}
|
|
3440
|
-
case 3: {
|
|
3441
|
-
if (tag !== 26) {
|
|
3442
|
-
break;
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
message.id.push(reader.string());
|
|
3446
|
-
continue;
|
|
3447
|
-
}
|
|
3448
|
-
}
|
|
3449
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3450
|
-
break;
|
|
3451
|
-
}
|
|
3452
|
-
reader.skip(tag & 7);
|
|
3453
|
-
}
|
|
3454
|
-
return message;
|
|
3455
|
-
},
|
|
3456
|
-
|
|
3457
|
-
fromJSON(object: any): UpdateChecksReq {
|
|
3458
|
-
return {
|
|
3459
|
-
address: isSet(object.address) ? globalThis.String(object.address) : "",
|
|
3460
|
-
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
3461
|
-
id: globalThis.Array.isArray(object?.id) ? object.id.map((e: any) => globalThis.String(e)) : [],
|
|
3462
|
-
};
|
|
3463
|
-
},
|
|
3464
|
-
|
|
3465
|
-
toJSON(message: UpdateChecksReq): unknown {
|
|
3466
|
-
const obj: any = {};
|
|
3467
|
-
if (message.address !== "") {
|
|
3468
|
-
obj.address = message.address;
|
|
3469
|
-
}
|
|
3470
|
-
if (message.signature !== "") {
|
|
3471
|
-
obj.signature = message.signature;
|
|
3472
|
-
}
|
|
3473
|
-
if (message.id?.length) {
|
|
3474
|
-
obj.id = message.id;
|
|
3475
|
-
}
|
|
3476
|
-
return obj;
|
|
3477
|
-
},
|
|
3478
|
-
|
|
3479
|
-
create<I extends Exact<DeepPartial<UpdateChecksReq>, I>>(base?: I): UpdateChecksReq {
|
|
3480
|
-
return UpdateChecksReq.fromPartial(base ?? ({} as any));
|
|
3481
|
-
},
|
|
3482
|
-
fromPartial<I extends Exact<DeepPartial<UpdateChecksReq>, I>>(object: I): UpdateChecksReq {
|
|
3483
|
-
const message = createBaseUpdateChecksReq();
|
|
3484
|
-
message.address = object.address ?? "";
|
|
3485
|
-
message.signature = object.signature ?? "";
|
|
3486
|
-
message.id = object.id?.map((e) => e) || [];
|
|
3487
|
-
return message;
|
|
3488
|
-
},
|
|
3489
|
-
};
|
|
3490
|
-
|
|
3491
|
-
function createBaseUpdateChecksResp(): UpdateChecksResp {
|
|
3492
|
-
return { updatedAt: undefined };
|
|
3493
|
-
}
|
|
3494
|
-
|
|
3495
|
-
export const UpdateChecksResp: MessageFns<UpdateChecksResp> = {
|
|
3496
|
-
encode(message: UpdateChecksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3497
|
-
if (message.updatedAt !== undefined) {
|
|
3498
|
-
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(10).fork()).join();
|
|
3499
|
-
}
|
|
3500
|
-
return writer;
|
|
3501
|
-
},
|
|
3502
|
-
|
|
3503
|
-
decode(input: BinaryReader | Uint8Array, length?: number): UpdateChecksResp {
|
|
3504
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3505
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
3506
|
-
const message = createBaseUpdateChecksResp();
|
|
3507
|
-
while (reader.pos < end) {
|
|
3508
|
-
const tag = reader.uint32();
|
|
3509
|
-
switch (tag >>> 3) {
|
|
3510
|
-
case 1: {
|
|
3511
|
-
if (tag !== 10) {
|
|
3512
|
-
break;
|
|
3513
|
-
}
|
|
3514
|
-
|
|
3515
|
-
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
3516
|
-
continue;
|
|
3517
|
-
}
|
|
3518
|
-
}
|
|
3519
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3520
|
-
break;
|
|
3521
|
-
}
|
|
3522
|
-
reader.skip(tag & 7);
|
|
3523
|
-
}
|
|
3524
|
-
return message;
|
|
3525
|
-
},
|
|
3526
|
-
|
|
3527
|
-
fromJSON(object: any): UpdateChecksResp {
|
|
3528
|
-
return { updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined };
|
|
3529
|
-
},
|
|
3530
|
-
|
|
3531
|
-
toJSON(message: UpdateChecksResp): unknown {
|
|
3532
|
-
const obj: any = {};
|
|
3533
|
-
if (message.updatedAt !== undefined) {
|
|
3534
|
-
obj.updatedAt = message.updatedAt.toISOString();
|
|
3535
|
-
}
|
|
3536
|
-
return obj;
|
|
3537
|
-
},
|
|
3538
|
-
|
|
3539
|
-
create<I extends Exact<DeepPartial<UpdateChecksResp>, I>>(base?: I): UpdateChecksResp {
|
|
3540
|
-
return UpdateChecksResp.fromPartial(base ?? ({} as any));
|
|
3541
|
-
},
|
|
3542
|
-
fromPartial<I extends Exact<DeepPartial<UpdateChecksResp>, I>>(object: I): UpdateChecksResp {
|
|
3543
|
-
const message = createBaseUpdateChecksResp();
|
|
3544
|
-
message.updatedAt = object.updatedAt ?? undefined;
|
|
3545
|
-
return message;
|
|
3546
|
-
},
|
|
3547
|
-
};
|
|
3548
|
-
|
|
3549
|
-
export interface Aggregator {
|
|
3550
|
-
/** Auth */
|
|
3551
|
-
GetKey(request: GetKeyReq): Promise<KeyResp>;
|
|
3552
|
-
/** Smart Acccount */
|
|
3553
|
-
GetNonce(request: NonceRequest): Promise<NonceResp>;
|
|
3554
|
-
GetSmartAccountAddress(request: AddressRequest): Promise<AddressResp>;
|
|
3555
|
-
/** Task Management */
|
|
3556
|
-
CreateTask(request: CreateTaskReq): Promise<CreateTaskResp>;
|
|
3557
|
-
ListTasks(request: ListTasksReq): Promise<ListTasksResp>;
|
|
3558
|
-
GetTask(request: UUID): Promise<Task>;
|
|
3559
|
-
CancelTask(request: UUID): Promise<BoolValue>;
|
|
3560
|
-
DeleteTask(request: UUID): Promise<BoolValue>;
|
|
3561
|
-
/** Operator endpoint */
|
|
3562
|
-
Ping(request: Checkin): Promise<CheckinResp>;
|
|
3563
|
-
SyncTasks(request: SyncTasksReq): Observable<SyncTasksResp>;
|
|
3564
|
-
UpdateChecks(request: UpdateChecksReq): Promise<UpdateChecksResp>;
|
|
3565
|
-
}
|
|
3566
|
-
|
|
3567
|
-
export const AggregatorServiceName = "aggregator.Aggregator";
|
|
3568
|
-
export class AggregatorClientImpl implements Aggregator {
|
|
3569
|
-
private readonly rpc: Rpc;
|
|
3570
|
-
private readonly service: string;
|
|
3571
|
-
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
3572
|
-
this.service = opts?.service || AggregatorServiceName;
|
|
3573
|
-
this.rpc = rpc;
|
|
3574
|
-
this.GetKey = this.GetKey.bind(this);
|
|
3575
|
-
this.GetNonce = this.GetNonce.bind(this);
|
|
3576
|
-
this.GetSmartAccountAddress = this.GetSmartAccountAddress.bind(this);
|
|
3577
|
-
this.CreateTask = this.CreateTask.bind(this);
|
|
3578
|
-
this.ListTasks = this.ListTasks.bind(this);
|
|
3579
|
-
this.GetTask = this.GetTask.bind(this);
|
|
3580
|
-
this.CancelTask = this.CancelTask.bind(this);
|
|
3581
|
-
this.DeleteTask = this.DeleteTask.bind(this);
|
|
3582
|
-
this.Ping = this.Ping.bind(this);
|
|
3583
|
-
this.SyncTasks = this.SyncTasks.bind(this);
|
|
3584
|
-
this.UpdateChecks = this.UpdateChecks.bind(this);
|
|
3585
|
-
}
|
|
3586
|
-
GetKey(request: GetKeyReq): Promise<KeyResp> {
|
|
3587
|
-
const data = GetKeyReq.encode(request).finish();
|
|
3588
|
-
const promise = this.rpc.request(this.service, "GetKey", data);
|
|
3589
|
-
return promise.then((data) => KeyResp.decode(new BinaryReader(data)));
|
|
3590
|
-
}
|
|
3591
|
-
|
|
3592
|
-
GetNonce(request: NonceRequest): Promise<NonceResp> {
|
|
3593
|
-
const data = NonceRequest.encode(request).finish();
|
|
3594
|
-
const promise = this.rpc.request(this.service, "GetNonce", data);
|
|
3595
|
-
return promise.then((data) => NonceResp.decode(new BinaryReader(data)));
|
|
3596
|
-
}
|
|
3597
|
-
|
|
3598
|
-
GetSmartAccountAddress(request: AddressRequest): Promise<AddressResp> {
|
|
3599
|
-
const data = AddressRequest.encode(request).finish();
|
|
3600
|
-
const promise = this.rpc.request(this.service, "GetSmartAccountAddress", data);
|
|
3601
|
-
return promise.then((data) => AddressResp.decode(new BinaryReader(data)));
|
|
3602
|
-
}
|
|
3603
|
-
|
|
3604
|
-
CreateTask(request: CreateTaskReq): Promise<CreateTaskResp> {
|
|
3605
|
-
const data = CreateTaskReq.encode(request).finish();
|
|
3606
|
-
const promise = this.rpc.request(this.service, "CreateTask", data);
|
|
3607
|
-
return promise.then((data) => CreateTaskResp.decode(new BinaryReader(data)));
|
|
3608
|
-
}
|
|
3609
|
-
|
|
3610
|
-
ListTasks(request: ListTasksReq): Promise<ListTasksResp> {
|
|
3611
|
-
const data = ListTasksReq.encode(request).finish();
|
|
3612
|
-
const promise = this.rpc.request(this.service, "ListTasks", data);
|
|
3613
|
-
return promise.then((data) => ListTasksResp.decode(new BinaryReader(data)));
|
|
3614
|
-
}
|
|
3615
|
-
|
|
3616
|
-
GetTask(request: UUID): Promise<Task> {
|
|
3617
|
-
const data = UUID.encode(request).finish();
|
|
3618
|
-
const promise = this.rpc.request(this.service, "GetTask", data);
|
|
3619
|
-
return promise.then((data) => Task.decode(new BinaryReader(data)));
|
|
3620
|
-
}
|
|
3621
|
-
|
|
3622
|
-
CancelTask(request: UUID): Promise<BoolValue> {
|
|
3623
|
-
const data = UUID.encode(request).finish();
|
|
3624
|
-
const promise = this.rpc.request(this.service, "CancelTask", data);
|
|
3625
|
-
return promise.then((data) => BoolValue.decode(new BinaryReader(data)));
|
|
3626
|
-
}
|
|
3627
|
-
|
|
3628
|
-
DeleteTask(request: UUID): Promise<BoolValue> {
|
|
3629
|
-
const data = UUID.encode(request).finish();
|
|
3630
|
-
const promise = this.rpc.request(this.service, "DeleteTask", data);
|
|
3631
|
-
return promise.then((data) => BoolValue.decode(new BinaryReader(data)));
|
|
3632
|
-
}
|
|
3633
|
-
|
|
3634
|
-
Ping(request: Checkin): Promise<CheckinResp> {
|
|
3635
|
-
const data = Checkin.encode(request).finish();
|
|
3636
|
-
const promise = this.rpc.request(this.service, "Ping", data);
|
|
3637
|
-
return promise.then((data) => CheckinResp.decode(new BinaryReader(data)));
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
SyncTasks(request: SyncTasksReq): Observable<SyncTasksResp> {
|
|
3641
|
-
const data = SyncTasksReq.encode(request).finish();
|
|
3642
|
-
const result = this.rpc.serverStreamingRequest(this.service, "SyncTasks", data);
|
|
3643
|
-
return result.pipe(map((data) => SyncTasksResp.decode(new BinaryReader(data))));
|
|
3644
|
-
}
|
|
3645
|
-
|
|
3646
|
-
UpdateChecks(request: UpdateChecksReq): Promise<UpdateChecksResp> {
|
|
3647
|
-
const data = UpdateChecksReq.encode(request).finish();
|
|
3648
|
-
const promise = this.rpc.request(this.service, "UpdateChecks", data);
|
|
3649
|
-
return promise.then((data) => UpdateChecksResp.decode(new BinaryReader(data)));
|
|
3650
|
-
}
|
|
3651
|
-
}
|
|
3652
|
-
|
|
3653
|
-
export interface Rpc {
|
|
3654
|
-
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
3655
|
-
clientStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Promise<Uint8Array>;
|
|
3656
|
-
serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable<Uint8Array>;
|
|
3657
|
-
bidirectionalStreamingRequest(service: string, method: string, data: Observable<Uint8Array>): Observable<Uint8Array>;
|
|
3658
|
-
}
|
|
3659
|
-
|
|
3660
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
3661
|
-
|
|
3662
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
3663
|
-
: T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
3664
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
3665
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
3666
|
-
: Partial<T>;
|
|
3667
|
-
|
|
3668
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
3669
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
3670
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
3671
|
-
|
|
3672
|
-
function toTimestamp(date: Date): Timestamp {
|
|
3673
|
-
const seconds = Math.trunc(date.getTime() / 1_000);
|
|
3674
|
-
const nanos = (date.getTime() % 1_000) * 1_000_000;
|
|
3675
|
-
return { seconds, nanos };
|
|
3676
|
-
}
|
|
3677
|
-
|
|
3678
|
-
function fromTimestamp(t: Timestamp): Date {
|
|
3679
|
-
let millis = (t.seconds || 0) * 1_000;
|
|
3680
|
-
millis += (t.nanos || 0) / 1_000_000;
|
|
3681
|
-
return new globalThis.Date(millis);
|
|
3682
|
-
}
|
|
3683
|
-
|
|
3684
|
-
function fromJsonTimestamp(o: any): Date {
|
|
3685
|
-
if (o instanceof globalThis.Date) {
|
|
3686
|
-
return o;
|
|
3687
|
-
} else if (typeof o === "string") {
|
|
3688
|
-
return new globalThis.Date(o);
|
|
3689
|
-
} else {
|
|
3690
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
3691
|
-
}
|
|
3692
|
-
}
|
|
3693
|
-
|
|
3694
|
-
function longToNumber(int64: { toString(): string }): number {
|
|
3695
|
-
const num = globalThis.Number(int64.toString());
|
|
3696
|
-
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
3697
|
-
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
3698
|
-
}
|
|
3699
|
-
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
3700
|
-
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
3701
|
-
}
|
|
3702
|
-
return num;
|
|
3703
|
-
}
|
|
3704
|
-
|
|
3705
|
-
function isObject(value: any): boolean {
|
|
3706
|
-
return typeof value === "object" && value !== null;
|
|
3707
|
-
}
|
|
3708
|
-
|
|
3709
|
-
function isSet(value: any): boolean {
|
|
3710
|
-
return value !== null && value !== undefined;
|
|
3711
|
-
}
|
|
3712
|
-
|
|
3713
|
-
export interface MessageFns<T> {
|
|
3714
|
-
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
3715
|
-
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
3716
|
-
fromJSON(object: any): T;
|
|
3717
|
-
toJSON(message: T): unknown;
|
|
3718
|
-
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
3719
|
-
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
3720
|
-
}
|