From a7eed429c43a1b96041272f5aa60ee5c491baf71 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 13 Nov 2024 23:11:47 -0800 Subject: [PATCH 01/51] start fixing ava-sdk-js test --- config/aggregator.yaml | 1 + dist/index.cjs | 4506 --------------- dist/index.d.cts | 1499 ----- dist/index.d.mts | 1558 ------ dist/index.d.ts | 1558 ------ dist/index.js | 3864 +++++++------ dist/index.mjs | 3873 +++++++------ grpc_codegen/avs.proto | 335 +- grpc_codegen/avs.ts | 3720 ------------- grpc_codegen/avs_grpc_pb.d.ts | 827 +-- grpc_codegen/avs_grpc_pb.js | 41 +- grpc_codegen/avs_pb.d.ts | 693 ++- grpc_codegen/avs_pb.js | 9917 +++++++++++++++++++-------------- src/index.ts | 65 +- tests/basic.test.ts | 32 +- tests/utils.ts | 2 +- 16 files changed, 11306 insertions(+), 21185 deletions(-) delete mode 100644 dist/index.cjs delete mode 100644 dist/index.d.cts delete mode 100644 dist/index.d.mts delete mode 100644 dist/index.d.ts delete mode 100644 grpc_codegen/avs.ts diff --git a/config/aggregator.yaml b/config/aggregator.yaml index 83f1733..ea49452 100644 --- a/config/aggregator.yaml +++ b/config/aggregator.yaml @@ -1,4 +1,5 @@ # Dummy unsecure test key. do not deposit real fund to here +# Wallet: 0x578B110b0a7c06e66b7B1a33C39635304aaF733c ecdsa_private_key: e0502ddd5a0d05ec7b5c22614a01c8ce783810edaa98e44cc82f5fa5a819aaa9 eth_rpc_url: https://holesky.gateway.tenderly.co/6PJfDJkrMGBl3f4MuyU5M diff --git a/dist/index.cjs b/dist/index.cjs deleted file mode 100644 index 0082c65..0000000 --- a/dist/index.cjs +++ /dev/null @@ -1,4506 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// grpc_codegen/avs_pb.js -var avs_pb_exports = {}; -__export(avs_pb_exports, { - CreateTaskReq: () => CreateTaskReq, - CreateTaskResp: () => CreateTaskResp, - GetKeyReq: () => GetKeyReq, - KeyResp: () => KeyResp, - Task: () => Task, - UpdateChecksReq: () => UpdateChecksReq, - UpdateChecksResp: () => UpdateChecksResp -}); -var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp; -var init_avs_pb = __esm({ - "grpc_codegen/avs_pb.js"() { - "use strict"; - jspb = require("google-protobuf"); - goog = jspb; - global = function() { - if (this) { - return this; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return Function("return this")(); - }.call(null); - google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); - goog.object.extend(proto, google_protobuf_timestamp_pb); - google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); - goog.object.extend(proto, google_protobuf_wrappers_pb); - goog.exportSymbol("proto.aggregator.AddressRequest", null, global); - goog.exportSymbol("proto.aggregator.AddressResp", null, global); - goog.exportSymbol("proto.aggregator.BranchAction", null, global); - goog.exportSymbol("proto.aggregator.Checkin", null, global); - goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); - goog.exportSymbol("proto.aggregator.CheckinResp", null, global); - goog.exportSymbol("proto.aggregator.ConditionJump", null, global); - goog.exportSymbol("proto.aggregator.ContractExecution", null, global); - goog.exportSymbol("proto.aggregator.ContractQueryCondition", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); - goog.exportSymbol("proto.aggregator.CustomCode", null, global); - goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); - goog.exportSymbol("proto.aggregator.ETHTransfer", null, global); - goog.exportSymbol("proto.aggregator.Execution", null, global); - goog.exportSymbol("proto.aggregator.ExpressionCondition", null, global); - goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); - goog.exportSymbol("proto.aggregator.GraphQLDataQuery", null, global); - goog.exportSymbol("proto.aggregator.HTTPAPICall", null, global); - goog.exportSymbol("proto.aggregator.KeyResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp.TaskItemResp", null, global); - goog.exportSymbol("proto.aggregator.NonceRequest", null, global); - goog.exportSymbol("proto.aggregator.NonceResp", null, global); - goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); - goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); - goog.exportSymbol("proto.aggregator.Task", null, global); - goog.exportSymbol("proto.aggregator.TaskAction", null, global); - goog.exportSymbol("proto.aggregator.TaskStatus", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); - goog.exportSymbol("proto.aggregator.TaskType", null, global); - goog.exportSymbol("proto.aggregator.TimeCondition", null, global); - goog.exportSymbol("proto.aggregator.TriggerType", null, global); - goog.exportSymbol("proto.aggregator.UUID", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); - proto.aggregator.UUID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.UUID, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; - } - proto.aggregator.Checkin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; - } - proto.aggregator.Checkin.Status = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.Status.displayName = "proto.aggregator.Checkin.Status"; - } - proto.aggregator.CheckinResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CheckinResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; - } - proto.aggregator.SyncTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; - } - proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; - } - proto.aggregator.TimeCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TimeCondition.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.TimeCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; - } - proto.aggregator.ContractQueryCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractQueryCondition.displayName = "proto.aggregator.ContractQueryCondition"; - } - proto.aggregator.ExpressionCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ExpressionCondition.displayName = "proto.aggregator.ExpressionCondition"; - } - proto.aggregator.SyncTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; - } - proto.aggregator.ETHTransfer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; - } - proto.aggregator.ContractExecution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractExecution, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractExecution.displayName = "proto.aggregator.ContractExecution"; - } - proto.aggregator.GraphQLDataQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLDataQuery.displayName = "proto.aggregator.GraphQLDataQuery"; - } - proto.aggregator.HTTPAPICall = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; - } - proto.aggregator.CustomCode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CustomCode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; - } - proto.aggregator.ConditionJump = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ConditionJump, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; - } - proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchAction.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.BranchAction, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; - } - proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TaskAction.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.TaskAction, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; - } - proto.aggregator.Execution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Execution, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; - } - proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.Task, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Task.displayName = "proto.aggregator.Task"; - } - proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; - } - proto.aggregator.CreateTaskResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskResp.displayName = "proto.aggregator.CreateTaskResp"; - } - proto.aggregator.NonceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceRequest, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; - } - proto.aggregator.NonceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; - } - proto.aggregator.AddressRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.AddressRequest, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; - } - proto.aggregator.AddressResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.AddressResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; - } - proto.aggregator.ListTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; - } - proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; - } - proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.TaskItemResp.displayName = "proto.aggregator.ListTasksResp.TaskItemResp"; - } - proto.aggregator.GetKeyReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; - } - proto.aggregator.KeyResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.KeyResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; - } - proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksReq.displayName = "proto.aggregator.UpdateChecksReq"; - } - proto.aggregator.UpdateChecksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; - } - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); - }; - proto.aggregator.UUID.toObject = function(includeInstance, msg) { - var f, obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UUID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID(); - return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBytes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UUID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UUID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getBytes(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.UUID.prototype.getBytes = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.UUID.prototype.setBytes = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 5, ""), - metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin(); - return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = new proto.aggregator.Checkin.Status(); - reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setVersion(value); - break; - case 6: - var value = ( - /** @type {number} */ - reader.readInt32() - ); - msg.setMetricsport(value); - break; - case 7: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setRemoteip(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.Checkin.Status.serializeBinaryToWriter - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMetricsport(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getRemoteip(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { - var f, obj = { - uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), - queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setUptime(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setQueuedepth(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastHeartbeat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUptime(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getQueuedepth(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getLastHeartbeat(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Checkin.Status.prototype.getUptime = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) - ); - }; - proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { - return this.setLastHeartbeat(void 0); - }; - proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.Checkin.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Checkin.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Checkin.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Checkin.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Checkin.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Checkin.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Checkin.prototype.getStatus = function() { - return ( - /** @type{?proto.aggregator.Checkin.Status} */ - jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) - ); - }; - proto.aggregator.Checkin.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Checkin.prototype.clearStatus = function() { - return this.setStatus(void 0); - }; - proto.aggregator.Checkin.prototype.hasStatus = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Checkin.prototype.getVersion = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.Checkin.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.Checkin.prototype.getMetricsport = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) - ); - }; - proto.aggregator.Checkin.prototype.setMetricsport = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); - }; - proto.aggregator.Checkin.prototype.getRemoteip = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 7, "") - ); - }; - proto.aggregator.Checkin.prototype.setRemoteip = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CheckinResp(); - return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CheckinResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq(); - return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMonotonicClock(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMonotonicClock(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - }; - proto.aggregator.SyncTasksReq.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { - var f, obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - schedule: (f = msg.getSchedule()) && proto.aggregator.TimeCondition.toObject(includeInstance, f), - contractQuery: (f = msg.getContractQuery()) && proto.aggregator.ContractQueryCondition.toObject(includeInstance, f), - expression: (f = msg.getExpression()) && proto.aggregator.ExpressionCondition.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TriggerType} */ - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: - var value = new proto.aggregator.TimeCondition(); - reader.readMessage(value, proto.aggregator.TimeCondition.deserializeBinaryFromReader); - msg.setSchedule(value); - break; - case 3: - var value = new proto.aggregator.ContractQueryCondition(); - reader.readMessage(value, proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader); - msg.setContractQuery(value); - break; - case 4: - var value = new proto.aggregator.ExpressionCondition(); - reader.readMessage(value, proto.aggregator.ExpressionCondition.deserializeBinaryFromReader); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getSchedule(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.TimeCondition.serializeBinaryToWriter - ); - } - f = message.getContractQuery(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter - ); - } - f = message.getExpression(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.ExpressionCondition.serializeBinaryToWriter - ); - } - }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return ( - /** @type{?proto.aggregator.TimeCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); - }; - proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return ( - /** @type{?proto.aggregator.ContractQueryCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryCondition, 3) - ); - }; - proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getExpression = function() { - return ( - /** @type{?proto.aggregator.ExpressionCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) - ); - }; - proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.TimeCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { - var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TimeCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TimeCondition(); - return proto.aggregator.TimeCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = ( - /** @type {!Array} */ - reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] - ); - for (var i = 0; i < values.length; i++) { - msg.addFixed(values[i]); - } - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCron(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TimeCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64( - 1, - f - ); - } - f = message.getCron(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.TimeCondition.prototype.getFixedList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 1) - ); - }; - proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { - return jspb.Message.setField(this, 1, value || []); - }; - proto.aggregator.TimeCondition.prototype.addFixed = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); - }; - proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); - }; - proto.aggregator.TimeCondition.prototype.getCron = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractQueryCondition.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryCondition(); - return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallmsg(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ExpressionCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ExpressionCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ExpressionCondition(); - return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ExpressionCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.ExpressionCondition.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - }; - proto.aggregator.SyncTasksResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) - ); - }; - proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); - }; - proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { - var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer(); - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setDestination(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ETHTransfer.prototype.getDestination = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ETHTransfer.prototype.getAmount = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - encodedParams: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractExecution(); - return proto.aggregator.ContractExecution.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallData(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMethod(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setEncodedParams(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractExecution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEncodedParams(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - }; - proto.aggregator.ContractExecution.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractExecution.prototype.getCallData = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.ContractExecution.prototype.getMethod = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject(opt_includeInstance, this); - }; - proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLDataQuery(); - return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setQuery(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getQuery(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); - }; - proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.HTTPAPICall(); - return proto.aggregator.HTTPAPICall.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBody(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.HTTPAPICall.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { - return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField( - this, - 2, - opt_noLazyCreate, - null - ) - ); - }; - proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this; - }; - proto.aggregator.HTTPAPICall.prototype.getBody = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); - }; - proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CustomCode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCode(); - return proto.aggregator.CustomCode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.CustomCodeType} */ - reader.readEnum() - ); - msg.setType(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBody(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CustomCode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.CustomCode.prototype.getType = function() { - return ( - /** @type {!proto.aggregator.CustomCodeType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.CustomCode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.CustomCode.prototype.getBody = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CustomCode.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); - }; - proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNext(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ConditionJump.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNext(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ConditionJump.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ConditionJump.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ConditionJump.prototype.getNext = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ConditionJump.prototype.setNext = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.BranchAction.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); - }; - proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { - var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList( - msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, - includeInstance - ), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.BranchAction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.BranchAction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getIf(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElseifsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - }; - proto.aggregator.BranchAction.prototype.getIf = function() { - return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) - ); - }; - proto.aggregator.BranchAction.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.BranchAction.prototype.clearIf = function() { - return this.setIf(void 0); - }; - proto.aggregator.BranchAction.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.BranchAction.prototype.getElseifsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2) - ); - }; - proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); - }; - proto.aggregator.BranchAction.prototype.clearElseifsList = function() { - return this.setElseifsList([]); - }; - proto.aggregator.BranchAction.prototype.getElse = function() { - return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) - ); - }; - proto.aggregator.BranchAction.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.BranchAction.prototype.clearElse = function() { - return this.setElse(void 0); - }; - proto.aggregator.BranchAction.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskAction.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { - var f, obj = { - taskType: jspb.Message.getFieldWithDefault(msg, 1, 0), - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - nextList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? void 0 : f, - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: (f = msg.getContractExecution()) && proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: (f = msg.getHttpDataQuery()) && proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchAction.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskAction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TaskType} */ - reader.readEnum() - ); - msg.setTaskType(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setName(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addNext(value); - break; - case 10: - var value = new proto.aggregator.ETHTransfer(); - reader.readMessage(value, proto.aggregator.ETHTransfer.deserializeBinaryFromReader); - msg.setEthTransfer(value); - break; - case 11: - var value = new proto.aggregator.ContractExecution(); - reader.readMessage(value, proto.aggregator.ContractExecution.deserializeBinaryFromReader); - msg.setContractExecution(value); - break; - case 12: - var value = new proto.aggregator.GraphQLDataQuery(); - reader.readMessage(value, proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader); - msg.setGraphqlDataQuery(value); - break; - case 13: - var value = new proto.aggregator.HTTPAPICall(); - reader.readMessage(value, proto.aggregator.HTTPAPICall.deserializeBinaryFromReader); - msg.setHttpDataQuery(value); - break; - case 14: - var value = new proto.aggregator.CustomCode(); - reader.readMessage(value, proto.aggregator.CustomCode.deserializeBinaryFromReader); - msg.setCustomCode(value); - break; - case 15: - var value = new proto.aggregator.BranchAction(); - reader.readMessage(value, proto.aggregator.BranchAction.deserializeBinaryFromReader); - msg.setBranch(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskAction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTaskType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString( - 4, - f - ); - } - f = message.getEthTransfer(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter - ); - } - f = message.getContractExecution(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.aggregator.ContractExecution.serializeBinaryToWriter - ); - } - f = message.getGraphqlDataQuery(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter - ); - } - f = message.getHttpDataQuery(); - if (f != null) { - writer.writeMessage( - 13, - f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter - ); - } - f = message.getCustomCode(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.aggregator.CustomCode.serializeBinaryToWriter - ); - } - f = message.getBranch(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.aggregator.BranchAction.serializeBinaryToWriter - ); - } - }; - proto.aggregator.TaskAction.prototype.getTaskType = function() { - return ( - /** @type {!proto.aggregator.TaskType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskAction.prototype.setTaskType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskAction.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TaskAction.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.TaskAction.prototype.getName = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.TaskAction.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.TaskAction.prototype.getNextList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 4) - ); - }; - proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); - }; - proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); - }; - proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); - }; - proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransfer} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) - ); - }; - proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); - }; - proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { - return this.setEthTransfer(void 0); - }; - proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; - }; - proto.aggregator.TaskAction.prototype.getContractExecution = function() { - return ( - /** @type{?proto.aggregator.ContractExecution} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) - ); - }; - proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); - }; - proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(void 0); - }; - proto.aggregator.TaskAction.prototype.hasContractExecution = function() { - return jspb.Message.getField(this, 11) != null; - }; - proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { - return ( - /** @type{?proto.aggregator.GraphQLDataQuery} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) - ); - }; - proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); - }; - proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); - }; - proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 12) != null; - }; - proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { - return ( - /** @type{?proto.aggregator.HTTPAPICall} */ - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) - ); - }; - proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); - }; - proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(void 0); - }; - proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { - return jspb.Message.getField(this, 13) != null; - }; - proto.aggregator.TaskAction.prototype.getCustomCode = function() { - return ( - /** @type{?proto.aggregator.CustomCode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) - ); - }; - proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); - }; - proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); - }; - proto.aggregator.TaskAction.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 14) != null; - }; - proto.aggregator.TaskAction.prototype.getBranch = function() { - return ( - /** @type{?proto.aggregator.BranchAction} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) - ); - }; - proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); - }; - proto.aggregator.TaskAction.prototype.clearBranch = function() { - return this.setBranch(void 0); - }; - proto.aggregator.TaskAction.prototype.hasBranch = function() { - return jspb.Message.getField(this, 15) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); - }; - proto.aggregator.Execution.toObject = function(includeInstance, msg) { - var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Execution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution(); - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setEpoch(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUserOpHash(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Execution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.Execution.prototype.getEpoch = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Execution.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Execution.prototype.getUserOpHash = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Execution.prototype.setUserOpHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Execution.prototype.getError = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Execution.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.repeatedFields_ = [5, 12]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Task.toObject(opt_includeInstance, this); - }; - proto.aggregator.Task.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), - owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 9, 0), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - executionsList: jspb.Message.toObjectList( - msg.getExecutionsList(), - proto.aggregator.Execution.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Task.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Task(); - return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.UUID(); - reader.readMessage(value, proto.aggregator.UUID.deserializeBinaryFromReader); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartAccountAddress(value); - break; - case 4: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - case 5: - var value = new proto.aggregator.TaskAction(); - reader.readMessage(value, proto.aggregator.TaskAction.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 6: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 7: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 8: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 9: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setCompletedAt(value); - break; - case 10: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - case 11: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); - break; - case 12: - var value = new proto.aggregator.Execution(); - reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); - msg.addExecutions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Task.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.UUID.serializeBinaryToWriter - ); - } - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter - ); - } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getCompletedAt(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool( - 11, - f - ); - } - f = message.getExecutionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - proto.aggregator.Execution.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Task.prototype.getId = function() { - return ( - /** @type{?proto.aggregator.UUID} */ - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) - ); - }; - proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.Task.prototype.clearId = function() { - return this.setId(void 0); - }; - proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.Task.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Task.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Task.prototype.getSmartAccountAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); - }; - proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.aggregator.TaskAction, opt_index); - }; - proto.aggregator.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; - proto.aggregator.Task.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) - ); - }; - proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); - }; - proto.aggregator.Task.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) - ); - }; - proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); - }; - proto.aggregator.Task.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 8, "") - ); - }; - proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); - }; - proto.aggregator.Task.prototype.getCompletedAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 9, 0) - ); - }; - proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); - }; - proto.aggregator.Task.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 10, 0) - ); - }; - proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); - }; - proto.aggregator.Task.prototype.getRepeatable = function() { - return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 11, false) - ); - }; - proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); - }; - proto.aggregator.Task.prototype.getExecutionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) - ); - }; - proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); - }; - proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.Execution, opt_index); - }; - proto.aggregator.Task.prototype.clearExecutionsList = function() { - return this.setExecutionsList([]); - }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { - var f, obj = { - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - case 2: - var value = new proto.aggregator.TaskAction(); - reader.readMessage(value, proto.aggregator.TaskAction.deserializeBinaryFromReader); - msg.addActions(value); - break; - case 3: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 6: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter - ); - } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool( - 6, - f - ); - } - }; - proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.TaskAction, opt_index); - }; - proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); - }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 3, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); - }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { - return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 6, false) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.CreateTaskResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateTaskResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceRequest(); - return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.NonceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceRequest.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { - var f, obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.NonceResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceResp(); - return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.NonceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceResp.prototype.getNonce = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); - }; - proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.AddressRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.AddressRequest.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.AddressRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { - var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartAccountAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.AddressResp.prototype.getNonce = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.AddressResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = {}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - }; - proto.aggregator.ListTasksResp.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - tasksList: jspb.Message.toObjectList( - msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage(value, proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader); - msg.addTasks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTasksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum( - 2, - f - ); - } - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); - }; - proto.aggregator.ListTasksResp.prototype.getTasksList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ListTasksResp.TaskItemResp, 1) - ); - }; - proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ListTasksResp.TaskItemResp, opt_index); - }; - proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { - return this.setTasksList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GetKeyReq(); - return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.GetKeyReq.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.GetKeyReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.KeyResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.KeyResp(); - return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.KeyResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.KeyResp.prototype.getKey = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.KeyResp.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } - }; - proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 3) - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); - }; - proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); - }; - proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 - }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 - }; - proto.aggregator.TaskStatus = { - ACTIVE: 0, - COMPLETED: 1, - FAILED: 2, - CANCELED: 3, - EXECUTING: 4 - }; - proto.aggregator.CustomCodeType = { - JAVASCRIPT: 0 - }; - goog.object.extend(exports, proto.aggregator); - ({ Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp } = proto.aggregator); - } -}); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - default: () => Client, - getKeyRequestMessage: () => getKeyRequestMessage -}); -module.exports = __toCommonJS(src_exports); -var grpc2 = __toESM(require("@grpc/grpc-js"), 1); - -// src/auth.ts -var getKeyRequestMessage = (address, expiredAt) => { - return `key request for ${address} expired at ${expiredAt}`; -}; - -// grpc_codegen/avs_grpc_pb.js -var grpc = require("@grpc/grpc-js"); -var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports)); -var google_protobuf_timestamp_pb2 = require("google-protobuf/google/protobuf/timestamp_pb.js"); -var google_protobuf_wrappers_pb2 = require("google-protobuf/google/protobuf/wrappers_pb.js"); -function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb.AddressRequest)) { - throw new Error("Expected argument of type aggregator.AddressRequest"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb.AddressResp)) { - throw new Error("Expected argument of type aggregator.AddressResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb.Checkin)) { - throw new Error("Expected argument of type aggregator.Checkin"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb.GetKeyReq)) { - throw new Error("Expected argument of type aggregator.GetKeyReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb.KeyResp)) { - throw new Error("Expected argument of type aggregator.KeyResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb.NonceRequest)) { - throw new Error("Expected argument of type aggregator.NonceRequest"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error("Expected argument of type aggregator.Task"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Task(buffer_arg) { - return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb.UUID)) { - throw new Error("Expected argument of type aggregator.UUID"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb.UUID.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb.UpdateChecksReq)) { - throw new Error("Expected argument of type aggregator.UpdateChecksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb2.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb2.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); -} -var AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb.GetKeyReq, - responseType: avs_pb.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb.NonceRequest, - responseType: avs_pb.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - requestStream: false, - responseStream: false, - requestType: avs_pb.AddressRequest, - responseType: avs_pb.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.CreateTaskReq, - responseType: avs_pb.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb.ListTasksReq, - responseType: avs_pb.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb.Checkin, - responseType: avs_pb.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp - } -}; -var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); - -// src/index.ts -init_avs_pb(); -var metadata = new grpc2.Metadata(); -var BaseClient = class { - // protected wallet?: any; - constructor(opts) { - this.endpoint = opts.endpoint; - this.rpcClient = new AggregatorClient( - this.endpoint, - // TODO: switch to the TLS after we're able to update all the operator - grpc2.ChannelCredentials.createInsecure() - ); - console.log("this.rpcClient:", this.rpcClient); - } - // async authWithJwtToken( - // address: string, - // jwtToken: string, - // expiredAt?: number - // ): Promise { - // console.log("Authenticating with JWT token: ", jwtToken); - // // Use the provided expiredAt or set it to 24 hours from now if not provided - // const expirationTime = - // expiredAt || Math.floor(Date.now() / 1000) + DEFAULT_JWT_EXPIRATION; - // const result: avsPb.KeyResp = await this._callRPC< - // avsPb.KeyResp, - // avsPb.GetKeyReq - // >("getKey", { - // owner: address, - // expired_at: expirationTime, - // signature: jwtToken, - // }); - // this.authkey = result.getKey(); - // return { key: result.getKey() }; - // } - // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address, signature, expiredAtEpoch) { - console.log( - "Authenticating with signature:", - signature, - "Expired at epoch:", - expiredAtEpoch - ); - const request = new GetKeyReq(); - request.setOwner(address); - request.setExpiredAt(expiredAtEpoch); - request.setSignature(signature); - let result = await this._callRPC( - "getKey", - request - ); - console.log("result:", result); - this.authkey = result.getKey(); - return { key: result.getKey() }; - } - isAuthenticated() { - return !!this.authkey; - } - _callRPC(method, request) { - return new Promise((resolve, reject) => { - this.rpcClient[method].bind(this.rpcClient)( - request, - metadata, - (error, response) => { - if (error) reject(error); - else resolve(response); - } - ); - }); - } -}; -var Client = class extends BaseClient { - constructor(config) { - super(config); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - getKeyRequestMessage -}); diff --git a/dist/index.d.cts b/dist/index.d.cts deleted file mode 100644 index 6839ee1..0000000 --- a/dist/index.d.cts +++ /dev/null @@ -1,1499 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import * as jspb from 'google-protobuf'; -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; - -declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; - -// package: aggregator -// file: avs.proto - - - -declare class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; -} - -declare namespace UUID { - export type AsObject = { - bytes: string, - } -} - -declare class Checkin extends jspb.Message { - getId(): string; - setId(value: string): Checkin; - getAddress(): string; - setAddress(value: string): Checkin; - getSignature(): string; - setSignature(value: string): Checkin; - - hasStatus(): boolean; - clearStatus(): void; - getStatus(): Checkin.Status | undefined; - setStatus(value?: Checkin.Status): Checkin; - getVersion(): string; - setVersion(value: string): Checkin; - getMetricsport(): number; - setMetricsport(value: number): Checkin; - getRemoteip(): string; - setRemoteip(value: string): Checkin; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Checkin.AsObject; - static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Checkin; - static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; -} - -declare namespace Checkin { - export type AsObject = { - id: string, - address: string, - signature: string, - status?: Checkin.Status.AsObject, - version: string, - metricsport: number, - remoteip: string, - } - - - export class Status extends jspb.Message { - getUptime(): number; - setUptime(value: number): Status; - getQueuedepth(): number; - setQueuedepth(value: number): Status; - - hasLastHeartbeat(): boolean; - clearLastHeartbeat(): void; - getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; - } - - export namespace Status { - export type AsObject = { - uptime: number, - queuedepth: number, - lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - } - -} - -declare class CheckinResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckinResp.AsObject; - static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckinResp; - static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; -} - -declare namespace CheckinResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class SyncTasksReq extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksReq; - getAddress(): string; - setAddress(value: string): SyncTasksReq; - getSignature(): string; - setSignature(value: string): SyncTasksReq; - getMonotonicClock(): number; - setMonotonicClock(value: number): SyncTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksReq; - static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; -} - -declare namespace SyncTasksReq { - export type AsObject = { - id: string, - address: string, - signature: string, - monotonicClock: number, - } -} - -declare class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; - - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; - - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; - - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; -} - -declare namespace TaskTrigger { - export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, - } -} - -declare class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; -} - -declare namespace TimeCondition { - export type AsObject = { - fixedList: Array, - cron: string, - } -} - -declare class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; -} - -declare namespace ContractQueryCondition { - export type AsObject = { - contractAddress: string, - callmsg: string, - } -} - -declare class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; -} - -declare namespace ExpressionCondition { - export type AsObject = { - expression: string, - } -} - -declare class SyncTasksResp extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksResp; - getChecktype(): string; - setChecktype(value: string): SyncTasksResp; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): SyncTasksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksResp; - static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; -} - -declare namespace SyncTasksResp { - export type AsObject = { - id: string, - checktype: string, - trigger?: TaskTrigger.AsObject, - } -} - -declare class ETHTransfer extends jspb.Message { - getDestination(): string; - setDestination(value: string): ETHTransfer; - getAmount(): string; - setAmount(value: string): ETHTransfer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; -} - -declare namespace ETHTransfer { - export type AsObject = { - destination: string, - amount: string, - } -} - -declare class ContractExecution extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractExecution; - getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; -} - -declare namespace ContractExecution { - export type AsObject = { - contractAddress: string, - callData: string, - method: string, - encodedParams: string, - } -} - -declare class GraphQLDataQuery extends jspb.Message { - getUrl(): string; - setUrl(value: string): GraphQLDataQuery; - getQuery(): string; - setQuery(value: string): GraphQLDataQuery; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; -} - -declare namespace GraphQLDataQuery { - export type AsObject = { - url: string, - query: string, - } -} - -declare class HTTPAPICall extends jspb.Message { - getUrl(): string; - setUrl(value: string): HTTPAPICall; - - getHeadersMap(): jspb.Map; - clearHeadersMap(): void; - getBody(): string; - setBody(value: string): HTTPAPICall; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; -} - -declare namespace HTTPAPICall { - export type AsObject = { - url: string, - - headersMap: Array<[string, string]>, - body: string, - } -} - -declare class CustomCode extends jspb.Message { - getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; -} - -declare namespace CustomCode { - export type AsObject = { - type: CustomCodeType, - body: string, - } -} - -declare class ConditionJump extends jspb.Message { - getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; -} - -declare namespace ConditionJump { - export type AsObject = { - expression: string, - next: string, - } -} - -declare class BranchAction extends jspb.Message { - - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; - - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; -} - -declare namespace BranchAction { - export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, - } -} - -declare class TaskAction extends jspb.Message { - getTaskType(): TaskType; - setTaskType(value: TaskType): TaskAction; - getId(): string; - setId(value: string): TaskAction; - getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; - - hasEthTransfer(): boolean; - clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; - - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; - - hasGraphqlDataQuery(): boolean; - clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; - - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; - - hasCustomCode(): boolean; - clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; - - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; -} - -declare namespace TaskAction { - export type AsObject = { - taskType: TaskType, - id: string, - name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, - } -} - -declare class Execution extends jspb.Message { - getEpoch(): number; - setEpoch(value: number): Execution; - getUserOpHash(): string; - setUserOpHash(value: string): Execution; - getError(): string; - setError(value: string): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; -} - -declare namespace Execution { - export type AsObject = { - epoch: number, - userOpHash: string, - error: string, - } -} - -declare class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; - getOwner(): string; - setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): Task; - getExpiredAt(): number; - setExpiredAt(value: number): Task; - getMemo(): string; - setMemo(value: string): Task; - getCompletedAt(): number; - setCompletedAt(value: number): Task; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; - clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task; - addExecutions(value?: Execution, index?: number): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task.AsObject; - static toObject(includeInstance: boolean, msg: Task): Task.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task; - static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task; -} - -declare namespace Task { - export type AsObject = { - id?: UUID.AsObject, - owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, - startAt: number, - expiredAt: number, - memo: string, - completedAt: number, - status: TaskStatus, - repeatable: boolean, - executionsList: Array, - } -} - -declare class CreateTaskReq extends jspb.Message { - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): CreateTaskReq; - getExpiredAt(): number; - setExpiredAt(value: number): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskReq.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskReq; - static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; -} - -declare namespace CreateTaskReq { - export type AsObject = { - trigger?: TaskTrigger.AsObject, - actionsList: Array, - startAt: number, - expiredAt: number, - memo: string, - repeatable: boolean, - } -} - -declare class CreateTaskResp extends jspb.Message { - getId(): string; - setId(value: string): CreateTaskResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskResp; - static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; -} - -declare namespace CreateTaskResp { - export type AsObject = { - id: string, - } -} - -declare class NonceRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): NonceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceRequest.AsObject; - static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceRequest; - static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; -} - -declare namespace NonceRequest { - export type AsObject = { - owner: string, - } -} - -declare class NonceResp extends jspb.Message { - getNonce(): string; - setNonce(value: string): NonceResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceResp.AsObject; - static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceResp; - static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; -} - -declare namespace NonceResp { - export type AsObject = { - nonce: string, - } -} - -declare class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; -} - -declare namespace AddressRequest { - export type AsObject = { - owner: string, - } -} - -declare class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; -} - -declare namespace AddressResp { - export type AsObject = { - smartAccountAddress: string, - nonce: string, - } -} - -declare class ListTasksReq extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksReq; - static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; -} - -declare namespace ListTasksReq { - export type AsObject = { - } -} - -declare class ListTasksResp extends jspb.Message { - clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksResp; - static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; -} - -declare namespace ListTasksResp { - export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } - } - -} - -declare class GetKeyReq extends jspb.Message { - getOwner(): string; - setOwner(value: string): GetKeyReq; - getExpiredAt(): number; - setExpiredAt(value: number): GetKeyReq; - getSignature(): string; - setSignature(value: string): GetKeyReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyReq.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyReq; - static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; -} - -declare namespace GetKeyReq { - export type AsObject = { - owner: string, - expiredAt: number, - signature: string, - } -} - -declare class KeyResp extends jspb.Message { - getKey(): string; - setKey(value: string): KeyResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyResp.AsObject; - static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyResp; - static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; -} - -declare namespace KeyResp { - export type AsObject = { - key: string, - } -} - -declare class UpdateChecksReq extends jspb.Message { - getAddress(): string; - setAddress(value: string): UpdateChecksReq; - getSignature(): string; - setSignature(value: string): UpdateChecksReq; - clearIdList(): void; - getIdList(): Array; - setIdList(value: Array): UpdateChecksReq; - addId(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; - static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; -} - -declare namespace UpdateChecksReq { - export type AsObject = { - address: string, - signature: string, - idList: Array, - } -} - -declare class UpdateChecksResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; - static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; -} - -declare namespace UpdateChecksResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, -} - -declare enum TaskType { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, -} - -declare enum TaskStatus { - ACTIVE = 0, - COMPLETED = 1, - FAILED = 2, - CANCELED = 3, - EXECUTING = 4, -} - -declare enum CustomCodeType { - JAVASCRIPT = 0, -} - -// package: aggregator -// file: avs.proto - - - -interface IAggregatorClient { - getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -type Environment = "production" | "development" | "staging"; -interface KeyExchangeResp { - key: string; -} -interface ClientOption { - endpoint: string; - jwtApiKey?: string; -} -interface TaskResp { - id: string; - status: string; - result?: any; - error?: string; -} -interface TaskListResp { - tasks: TaskResp[]; -} -interface SmartWalletResp { - address: string; - smart_account_address: string; -} -interface TransactionResp { - hash: string; -} -interface BalanceResp { - balance: string; -} - -declare class BaseClient { - readonly endpoint: string; - readonly rpcClient: AggregatorClient; - protected authkey?: string; - constructor(opts: ClientOption); - authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; - isAuthenticated(): boolean; - protected _callRPC(method: string, request: TRequest | any): Promise; -} -declare class Client extends BaseClient { - constructor(config: ClientOption); -} - -export { type BalanceResp, type ClientOption, type Environment, type KeyExchangeResp, type SmartWalletResp, type TaskListResp, type TaskResp, type TransactionResp, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.mts b/dist/index.d.mts deleted file mode 100644 index 4ba3997..0000000 --- a/dist/index.d.mts +++ /dev/null @@ -1,1558 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import { Metadata } from '@grpc/grpc-js'; -import * as jspb from 'google-protobuf'; -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; - -declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; - -// package: aggregator -// file: avs.proto - - - -declare class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; -} - -declare namespace UUID { - export type AsObject = { - bytes: string, - } -} - -declare class Checkin extends jspb.Message { - getId(): string; - setId(value: string): Checkin; - getAddress(): string; - setAddress(value: string): Checkin; - getSignature(): string; - setSignature(value: string): Checkin; - - hasStatus(): boolean; - clearStatus(): void; - getStatus(): Checkin.Status | undefined; - setStatus(value?: Checkin.Status): Checkin; - getVersion(): string; - setVersion(value: string): Checkin; - getMetricsport(): number; - setMetricsport(value: number): Checkin; - getRemoteip(): string; - setRemoteip(value: string): Checkin; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Checkin.AsObject; - static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Checkin; - static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; -} - -declare namespace Checkin { - export type AsObject = { - id: string, - address: string, - signature: string, - status?: Checkin.Status.AsObject, - version: string, - metricsport: number, - remoteip: string, - } - - - export class Status extends jspb.Message { - getUptime(): number; - setUptime(value: number): Status; - getQueuedepth(): number; - setQueuedepth(value: number): Status; - - hasLastHeartbeat(): boolean; - clearLastHeartbeat(): void; - getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; - } - - export namespace Status { - export type AsObject = { - uptime: number, - queuedepth: number, - lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - } - -} - -declare class CheckinResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckinResp.AsObject; - static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckinResp; - static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; -} - -declare namespace CheckinResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class SyncTasksReq extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksReq; - getAddress(): string; - setAddress(value: string): SyncTasksReq; - getSignature(): string; - setSignature(value: string): SyncTasksReq; - getMonotonicClock(): number; - setMonotonicClock(value: number): SyncTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksReq; - static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; -} - -declare namespace SyncTasksReq { - export type AsObject = { - id: string, - address: string, - signature: string, - monotonicClock: number, - } -} - -declare class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; - - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; - - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; - - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; -} - -declare namespace TaskTrigger { - export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, - } -} - -declare class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; -} - -declare namespace TimeCondition { - export type AsObject = { - fixedList: Array, - cron: string, - } -} - -declare class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; -} - -declare namespace ContractQueryCondition { - export type AsObject = { - contractAddress: string, - callmsg: string, - } -} - -declare class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; -} - -declare namespace ExpressionCondition { - export type AsObject = { - expression: string, - } -} - -declare class SyncTasksResp extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksResp; - getChecktype(): string; - setChecktype(value: string): SyncTasksResp; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): SyncTasksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksResp; - static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; -} - -declare namespace SyncTasksResp { - export type AsObject = { - id: string, - checktype: string, - trigger?: TaskTrigger.AsObject, - } -} - -declare class ETHTransfer extends jspb.Message { - getDestination(): string; - setDestination(value: string): ETHTransfer; - getAmount(): string; - setAmount(value: string): ETHTransfer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; -} - -declare namespace ETHTransfer { - export type AsObject = { - destination: string, - amount: string, - } -} - -declare class ContractExecution extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractExecution; - getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; -} - -declare namespace ContractExecution { - export type AsObject = { - contractAddress: string, - callData: string, - method: string, - encodedParams: string, - } -} - -declare class GraphQLDataQuery extends jspb.Message { - getUrl(): string; - setUrl(value: string): GraphQLDataQuery; - getQuery(): string; - setQuery(value: string): GraphQLDataQuery; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; -} - -declare namespace GraphQLDataQuery { - export type AsObject = { - url: string, - query: string, - } -} - -declare class HTTPAPICall extends jspb.Message { - getUrl(): string; - setUrl(value: string): HTTPAPICall; - - getHeadersMap(): jspb.Map; - clearHeadersMap(): void; - getBody(): string; - setBody(value: string): HTTPAPICall; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; -} - -declare namespace HTTPAPICall { - export type AsObject = { - url: string, - - headersMap: Array<[string, string]>, - body: string, - } -} - -declare class CustomCode extends jspb.Message { - getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; -} - -declare namespace CustomCode { - export type AsObject = { - type: CustomCodeType, - body: string, - } -} - -declare class ConditionJump extends jspb.Message { - getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; -} - -declare namespace ConditionJump { - export type AsObject = { - expression: string, - next: string, - } -} - -declare class BranchAction extends jspb.Message { - - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; - - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; -} - -declare namespace BranchAction { - export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, - } -} - -declare class TaskAction extends jspb.Message { - getTaskType(): TaskType$1; - setTaskType(value: TaskType$1): TaskAction; - getId(): string; - setId(value: string): TaskAction; - getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; - - hasEthTransfer(): boolean; - clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; - - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; - - hasGraphqlDataQuery(): boolean; - clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; - - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; - - hasCustomCode(): boolean; - clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; - - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; -} - -declare namespace TaskAction { - export type AsObject = { - taskType: TaskType$1, - id: string, - name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, - } -} - -declare class Execution extends jspb.Message { - getEpoch(): number; - setEpoch(value: number): Execution; - getUserOpHash(): string; - setUserOpHash(value: string): Execution; - getError(): string; - setError(value: string): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; -} - -declare namespace Execution { - export type AsObject = { - epoch: number, - userOpHash: string, - error: string, - } -} - -declare class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; - getOwner(): string; - setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): Task; - getExpiredAt(): number; - setExpiredAt(value: number): Task; - getMemo(): string; - setMemo(value: string): Task; - getCompletedAt(): number; - setCompletedAt(value: number): Task; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; - clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task; - addExecutions(value?: Execution, index?: number): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task.AsObject; - static toObject(includeInstance: boolean, msg: Task): Task.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task; - static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task; -} - -declare namespace Task { - export type AsObject = { - id?: UUID.AsObject, - owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, - startAt: number, - expiredAt: number, - memo: string, - completedAt: number, - status: TaskStatus, - repeatable: boolean, - executionsList: Array, - } -} - -declare class CreateTaskReq extends jspb.Message { - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): CreateTaskReq; - getExpiredAt(): number; - setExpiredAt(value: number): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskReq.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskReq; - static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; -} - -declare namespace CreateTaskReq { - export type AsObject = { - trigger?: TaskTrigger.AsObject, - actionsList: Array, - startAt: number, - expiredAt: number, - memo: string, - repeatable: boolean, - } -} - -declare class CreateTaskResp extends jspb.Message { - getId(): string; - setId(value: string): CreateTaskResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskResp; - static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; -} - -declare namespace CreateTaskResp { - export type AsObject = { - id: string, - } -} - -declare class NonceRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): NonceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceRequest.AsObject; - static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceRequest; - static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; -} - -declare namespace NonceRequest { - export type AsObject = { - owner: string, - } -} - -declare class NonceResp extends jspb.Message { - getNonce(): string; - setNonce(value: string): NonceResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceResp.AsObject; - static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceResp; - static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; -} - -declare namespace NonceResp { - export type AsObject = { - nonce: string, - } -} - -declare class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; -} - -declare namespace AddressRequest { - export type AsObject = { - owner: string, - } -} - -declare class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; -} - -declare namespace AddressResp { - export type AsObject = { - smartAccountAddress: string, - nonce: string, - } -} - -declare class ListTasksReq extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksReq; - static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; -} - -declare namespace ListTasksReq { - export type AsObject = { - } -} - -declare class ListTasksResp extends jspb.Message { - clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksResp; - static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; -} - -declare namespace ListTasksResp { - export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } - } - -} - -declare class GetKeyReq extends jspb.Message { - getOwner(): string; - setOwner(value: string): GetKeyReq; - getExpiredAt(): number; - setExpiredAt(value: number): GetKeyReq; - getSignature(): string; - setSignature(value: string): GetKeyReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyReq.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyReq; - static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; -} - -declare namespace GetKeyReq { - export type AsObject = { - owner: string, - expiredAt: number, - signature: string, - } -} - -declare class KeyResp extends jspb.Message { - getKey(): string; - setKey(value: string): KeyResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyResp.AsObject; - static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyResp; - static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; -} - -declare namespace KeyResp { - export type AsObject = { - key: string, - } -} - -declare class UpdateChecksReq extends jspb.Message { - getAddress(): string; - setAddress(value: string): UpdateChecksReq; - getSignature(): string; - setSignature(value: string): UpdateChecksReq; - clearIdList(): void; - getIdList(): Array; - setIdList(value: Array): UpdateChecksReq; - addId(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; - static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; -} - -declare namespace UpdateChecksReq { - export type AsObject = { - address: string, - signature: string, - idList: Array, - } -} - -declare class UpdateChecksResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; - static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; -} - -declare namespace UpdateChecksResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, -} - -declare enum TaskType$1 { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, -} - -declare enum TaskStatus { - ACTIVE = 0, - COMPLETED = 1, - FAILED = 2, - CANCELED = 3, - EXECUTING = 4, -} - -declare enum CustomCodeType { - JAVASCRIPT = 0, -} - -// package: aggregator -// file: avs.proto - - - -interface IAggregatorClient { - getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -type Environment = "production" | "development" | "staging"; -declare const AUTH_KEY_HEADER = "authKey"; -interface RequestOptions { - authKey: string; -} -interface GetKeyResponse { - authKey: string; -} -interface ClientOption { - endpoint: string; -} -interface TaskType { - id: string; - owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { - expression: string; - }; - }; - nodesList: Array<{ - taskType: number; - id: string; - name: string; - nextList: any[]; - ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; - customCode?: any; - branch?: any; - }>; - startAt: number; - expiredAt: number; - memo: string; - completedAt: number; - status: number; - repeatable: boolean; - executionsList: any[]; -} -interface CreateTaskResponse { - id: string; -} -interface ListTasksResponse { - tasks: { - id: string; - status: string; - }[]; -} -interface CancelTaskResponse { - value: boolean; -} -interface DeleteTaskResponse { - value: boolean; -} -interface GetAddressesResponse { - owner: string; - smart_account_address: string; -} - -declare class BaseClient { - readonly endpoint: string; - readonly rpcClient: AggregatorClient; - protected metadata: Metadata; - constructor(opts: ClientOption); - isAuthKeyValid(key: string): boolean; - authWithAPIKey(apiKey: string, expiredAtEpoch: number): Promise; - authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; - protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; -} -declare class Client extends BaseClient { - constructor(config: ClientOption); - getAddresses(address: string, { authKey }: { - authKey: string; - }): Promise; - createTask({ address, oracleContract, tokenContract, }: { - address: string; - tokenContract: string; - oracleContract: string; - }, { authKey }: { - authKey: string; - }): Promise; - listTasks(address: string, { authKey }: { - authKey: string; - }): Promise; - getTask(id: string, { authKey }: { - authKey: string; - }): Promise; - cancelTask(id: string, { authKey }: { - authKey: string; - }): Promise; - deleteTask(id: string, { authKey }: { - authKey: string; - }): Promise; -} - -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type DeleteTaskResponse, type Environment, type GetAddressesResponse, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index 4ba3997..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,1558 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import { Metadata } from '@grpc/grpc-js'; -import * as jspb from 'google-protobuf'; -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; - -declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; - -// package: aggregator -// file: avs.proto - - - -declare class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; -} - -declare namespace UUID { - export type AsObject = { - bytes: string, - } -} - -declare class Checkin extends jspb.Message { - getId(): string; - setId(value: string): Checkin; - getAddress(): string; - setAddress(value: string): Checkin; - getSignature(): string; - setSignature(value: string): Checkin; - - hasStatus(): boolean; - clearStatus(): void; - getStatus(): Checkin.Status | undefined; - setStatus(value?: Checkin.Status): Checkin; - getVersion(): string; - setVersion(value: string): Checkin; - getMetricsport(): number; - setMetricsport(value: number): Checkin; - getRemoteip(): string; - setRemoteip(value: string): Checkin; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Checkin.AsObject; - static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Checkin; - static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; -} - -declare namespace Checkin { - export type AsObject = { - id: string, - address: string, - signature: string, - status?: Checkin.Status.AsObject, - version: string, - metricsport: number, - remoteip: string, - } - - - export class Status extends jspb.Message { - getUptime(): number; - setUptime(value: number): Status; - getQueuedepth(): number; - setQueuedepth(value: number): Status; - - hasLastHeartbeat(): boolean; - clearLastHeartbeat(): void; - getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; - } - - export namespace Status { - export type AsObject = { - uptime: number, - queuedepth: number, - lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - } - -} - -declare class CheckinResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckinResp.AsObject; - static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckinResp; - static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; -} - -declare namespace CheckinResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class SyncTasksReq extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksReq; - getAddress(): string; - setAddress(value: string): SyncTasksReq; - getSignature(): string; - setSignature(value: string): SyncTasksReq; - getMonotonicClock(): number; - setMonotonicClock(value: number): SyncTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksReq; - static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; -} - -declare namespace SyncTasksReq { - export type AsObject = { - id: string, - address: string, - signature: string, - monotonicClock: number, - } -} - -declare class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; - - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; - - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; - - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; -} - -declare namespace TaskTrigger { - export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, - } -} - -declare class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; -} - -declare namespace TimeCondition { - export type AsObject = { - fixedList: Array, - cron: string, - } -} - -declare class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; -} - -declare namespace ContractQueryCondition { - export type AsObject = { - contractAddress: string, - callmsg: string, - } -} - -declare class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; -} - -declare namespace ExpressionCondition { - export type AsObject = { - expression: string, - } -} - -declare class SyncTasksResp extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksResp; - getChecktype(): string; - setChecktype(value: string): SyncTasksResp; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): SyncTasksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksResp; - static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; -} - -declare namespace SyncTasksResp { - export type AsObject = { - id: string, - checktype: string, - trigger?: TaskTrigger.AsObject, - } -} - -declare class ETHTransfer extends jspb.Message { - getDestination(): string; - setDestination(value: string): ETHTransfer; - getAmount(): string; - setAmount(value: string): ETHTransfer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; -} - -declare namespace ETHTransfer { - export type AsObject = { - destination: string, - amount: string, - } -} - -declare class ContractExecution extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractExecution; - getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; -} - -declare namespace ContractExecution { - export type AsObject = { - contractAddress: string, - callData: string, - method: string, - encodedParams: string, - } -} - -declare class GraphQLDataQuery extends jspb.Message { - getUrl(): string; - setUrl(value: string): GraphQLDataQuery; - getQuery(): string; - setQuery(value: string): GraphQLDataQuery; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; -} - -declare namespace GraphQLDataQuery { - export type AsObject = { - url: string, - query: string, - } -} - -declare class HTTPAPICall extends jspb.Message { - getUrl(): string; - setUrl(value: string): HTTPAPICall; - - getHeadersMap(): jspb.Map; - clearHeadersMap(): void; - getBody(): string; - setBody(value: string): HTTPAPICall; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; -} - -declare namespace HTTPAPICall { - export type AsObject = { - url: string, - - headersMap: Array<[string, string]>, - body: string, - } -} - -declare class CustomCode extends jspb.Message { - getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; -} - -declare namespace CustomCode { - export type AsObject = { - type: CustomCodeType, - body: string, - } -} - -declare class ConditionJump extends jspb.Message { - getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; -} - -declare namespace ConditionJump { - export type AsObject = { - expression: string, - next: string, - } -} - -declare class BranchAction extends jspb.Message { - - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; - - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; -} - -declare namespace BranchAction { - export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, - } -} - -declare class TaskAction extends jspb.Message { - getTaskType(): TaskType$1; - setTaskType(value: TaskType$1): TaskAction; - getId(): string; - setId(value: string): TaskAction; - getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; - - hasEthTransfer(): boolean; - clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; - - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; - - hasGraphqlDataQuery(): boolean; - clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; - - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; - - hasCustomCode(): boolean; - clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; - - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; -} - -declare namespace TaskAction { - export type AsObject = { - taskType: TaskType$1, - id: string, - name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, - } -} - -declare class Execution extends jspb.Message { - getEpoch(): number; - setEpoch(value: number): Execution; - getUserOpHash(): string; - setUserOpHash(value: string): Execution; - getError(): string; - setError(value: string): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; -} - -declare namespace Execution { - export type AsObject = { - epoch: number, - userOpHash: string, - error: string, - } -} - -declare class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; - getOwner(): string; - setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): Task; - getExpiredAt(): number; - setExpiredAt(value: number): Task; - getMemo(): string; - setMemo(value: string): Task; - getCompletedAt(): number; - setCompletedAt(value: number): Task; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; - clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task; - addExecutions(value?: Execution, index?: number): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task.AsObject; - static toObject(includeInstance: boolean, msg: Task): Task.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task; - static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task; -} - -declare namespace Task { - export type AsObject = { - id?: UUID.AsObject, - owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, - startAt: number, - expiredAt: number, - memo: string, - completedAt: number, - status: TaskStatus, - repeatable: boolean, - executionsList: Array, - } -} - -declare class CreateTaskReq extends jspb.Message { - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): CreateTaskReq; - getExpiredAt(): number; - setExpiredAt(value: number): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskReq.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskReq; - static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; -} - -declare namespace CreateTaskReq { - export type AsObject = { - trigger?: TaskTrigger.AsObject, - actionsList: Array, - startAt: number, - expiredAt: number, - memo: string, - repeatable: boolean, - } -} - -declare class CreateTaskResp extends jspb.Message { - getId(): string; - setId(value: string): CreateTaskResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskResp; - static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; -} - -declare namespace CreateTaskResp { - export type AsObject = { - id: string, - } -} - -declare class NonceRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): NonceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceRequest.AsObject; - static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceRequest; - static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; -} - -declare namespace NonceRequest { - export type AsObject = { - owner: string, - } -} - -declare class NonceResp extends jspb.Message { - getNonce(): string; - setNonce(value: string): NonceResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceResp.AsObject; - static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceResp; - static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; -} - -declare namespace NonceResp { - export type AsObject = { - nonce: string, - } -} - -declare class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; -} - -declare namespace AddressRequest { - export type AsObject = { - owner: string, - } -} - -declare class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; -} - -declare namespace AddressResp { - export type AsObject = { - smartAccountAddress: string, - nonce: string, - } -} - -declare class ListTasksReq extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksReq; - static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; -} - -declare namespace ListTasksReq { - export type AsObject = { - } -} - -declare class ListTasksResp extends jspb.Message { - clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksResp; - static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; -} - -declare namespace ListTasksResp { - export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } - } - -} - -declare class GetKeyReq extends jspb.Message { - getOwner(): string; - setOwner(value: string): GetKeyReq; - getExpiredAt(): number; - setExpiredAt(value: number): GetKeyReq; - getSignature(): string; - setSignature(value: string): GetKeyReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyReq.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyReq; - static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; -} - -declare namespace GetKeyReq { - export type AsObject = { - owner: string, - expiredAt: number, - signature: string, - } -} - -declare class KeyResp extends jspb.Message { - getKey(): string; - setKey(value: string): KeyResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyResp.AsObject; - static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyResp; - static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; -} - -declare namespace KeyResp { - export type AsObject = { - key: string, - } -} - -declare class UpdateChecksReq extends jspb.Message { - getAddress(): string; - setAddress(value: string): UpdateChecksReq; - getSignature(): string; - setSignature(value: string): UpdateChecksReq; - clearIdList(): void; - getIdList(): Array; - setIdList(value: Array): UpdateChecksReq; - addId(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; - static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; -} - -declare namespace UpdateChecksReq { - export type AsObject = { - address: string, - signature: string, - idList: Array, - } -} - -declare class UpdateChecksResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; - static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; -} - -declare namespace UpdateChecksResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, -} - -declare enum TaskType$1 { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, -} - -declare enum TaskStatus { - ACTIVE = 0, - COMPLETED = 1, - FAILED = 2, - CANCELED = 3, - EXECUTING = 4, -} - -declare enum CustomCodeType { - JAVASCRIPT = 0, -} - -// package: aggregator -// file: avs.proto - - - -interface IAggregatorClient { - getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -type Environment = "production" | "development" | "staging"; -declare const AUTH_KEY_HEADER = "authKey"; -interface RequestOptions { - authKey: string; -} -interface GetKeyResponse { - authKey: string; -} -interface ClientOption { - endpoint: string; -} -interface TaskType { - id: string; - owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { - expression: string; - }; - }; - nodesList: Array<{ - taskType: number; - id: string; - name: string; - nextList: any[]; - ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; - customCode?: any; - branch?: any; - }>; - startAt: number; - expiredAt: number; - memo: string; - completedAt: number; - status: number; - repeatable: boolean; - executionsList: any[]; -} -interface CreateTaskResponse { - id: string; -} -interface ListTasksResponse { - tasks: { - id: string; - status: string; - }[]; -} -interface CancelTaskResponse { - value: boolean; -} -interface DeleteTaskResponse { - value: boolean; -} -interface GetAddressesResponse { - owner: string; - smart_account_address: string; -} - -declare class BaseClient { - readonly endpoint: string; - readonly rpcClient: AggregatorClient; - protected metadata: Metadata; - constructor(opts: ClientOption); - isAuthKeyValid(key: string): boolean; - authWithAPIKey(apiKey: string, expiredAtEpoch: number): Promise; - authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; - protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; -} -declare class Client extends BaseClient { - constructor(config: ClientOption); - getAddresses(address: string, { authKey }: { - authKey: string; - }): Promise; - createTask({ address, oracleContract, tokenContract, }: { - address: string; - tokenContract: string; - oracleContract: string; - }, { authKey }: { - authKey: string; - }): Promise; - listTasks(address: string, { authKey }: { - authKey: string; - }): Promise; - getTask(id: string, { authKey }: { - authKey: string; - }): Promise; - cancelTask(id: string, { authKey }: { - authKey: string; - }): Promise; - deleteTask(id: string, { authKey }: { - authKey: string; - }): Promise; -} - -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type DeleteTaskResponse, type Environment, type GetAddressesResponse, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.js b/dist/index.js index 457ff92..2a05521 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5,8 +5,8 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) @@ -31,35 +31,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // grpc_codegen/avs_pb.js -var avs_pb_exports = {}; -__export(avs_pb_exports, { - ActionType: () => ActionType, - AddressRequest: () => AddressRequest, - AddressResp: () => AddressResp, - ContractExecution: () => ContractExecution, - CreateTaskReq: () => CreateTaskReq, - CreateTaskResp: () => CreateTaskResp, - ExpressionCondition: () => ExpressionCondition, - GetKeyReq: () => GetKeyReq, - KeyResp: () => KeyResp, - ListTasksReq: () => ListTasksReq, - ListTasksResp: () => ListTasksResp, - Task: () => Task, - TaskAction: () => TaskAction, - TaskTrigger: () => TaskTrigger, - TaskType: () => TaskType, - TriggerType: () => TriggerType, - UUID: () => UUID, - UpdateChecksReq: () => UpdateChecksReq, - UpdateChecksResp: () => UpdateChecksResp -}); -var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest, ListTasksReq, ListTasksResp, TaskTrigger, TriggerType, ExpressionCondition, TaskAction, ActionType, ContractExecution, TaskType, UUID; -var init_avs_pb = __esm({ - "grpc_codegen/avs_pb.js"() { +var require_avs_pb = __commonJS({ + "grpc_codegen/avs_pb.js"(exports2) { "use strict"; - jspb = require("google-protobuf"); - goog = jspb; - global = function() { + var jspb = require("google-protobuf"); + var goog = jspb; + var global = function() { if (this) { return this; } @@ -74,43 +51,52 @@ var init_avs_pb = __esm({ } return Function("return this")(); }.call(null); - google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); goog.object.extend(proto, google_protobuf_timestamp_pb); - google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); + var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); goog.object.extend(proto, google_protobuf_wrappers_pb); goog.exportSymbol("proto.aggregator.AddressRequest", null, global); goog.exportSymbol("proto.aggregator.AddressResp", null, global); - goog.exportSymbol("proto.aggregator.BranchAction", null, global); + goog.exportSymbol("proto.aggregator.BlockCondition", null, global); + goog.exportSymbol("proto.aggregator.BranchNode", null, global); goog.exportSymbol("proto.aggregator.Checkin", null, global); goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); goog.exportSymbol("proto.aggregator.CheckinResp", null, global); goog.exportSymbol("proto.aggregator.ConditionJump", null, global); - goog.exportSymbol("proto.aggregator.ContractExecution", null, global); - goog.exportSymbol("proto.aggregator.ContractQueryCondition", null, global); + goog.exportSymbol("proto.aggregator.ContractQueryNode", null, global); + goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); - goog.exportSymbol("proto.aggregator.CustomCode", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletReq", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletResp", null, global); + goog.exportSymbol("proto.aggregator.CronCondition", null, global); + goog.exportSymbol("proto.aggregator.CustomCodeNode", null, global); goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); - goog.exportSymbol("proto.aggregator.ETHTransfer", null, global); + goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global); + goog.exportSymbol("proto.aggregator.Error", null, global); + goog.exportSymbol("proto.aggregator.EventCondition", null, global); goog.exportSymbol("proto.aggregator.Execution", null, global); - goog.exportSymbol("proto.aggregator.ExpressionCondition", null, global); + goog.exportSymbol("proto.aggregator.FilterNode", null, global); + goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); - goog.exportSymbol("proto.aggregator.GraphQLDataQuery", null, global); - goog.exportSymbol("proto.aggregator.HTTPAPICall", null, global); + goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); goog.exportSymbol("proto.aggregator.KeyResp", null, global); goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp.TaskItemResp", null, global); goog.exportSymbol("proto.aggregator.NonceRequest", null, global); goog.exportSymbol("proto.aggregator.NonceResp", null, global); + goog.exportSymbol("proto.aggregator.RestAPINode", null, global); + goog.exportSymbol("proto.aggregator.SmartWallet", null, global); goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); goog.exportSymbol("proto.aggregator.Task", null, global); - goog.exportSymbol("proto.aggregator.TaskAction", null, global); + goog.exportSymbol("proto.aggregator.TaskEdge", null, global); + goog.exportSymbol("proto.aggregator.TaskNode", null, global); + goog.exportSymbol("proto.aggregator.TaskNode.TaskBodyCase", null, global); goog.exportSymbol("proto.aggregator.TaskStatus", null, global); goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerConditionCase", null, global); goog.exportSymbol("proto.aggregator.TaskType", null, global); - goog.exportSymbol("proto.aggregator.TimeCondition", null, global); goog.exportSymbol("proto.aggregator.TriggerType", null, global); goog.exportSymbol("proto.aggregator.UUID", null, global); goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); @@ -150,40 +136,40 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; } - proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + proto.aggregator.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); }; - goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); + goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; } - proto.aggregator.TimeCondition = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TimeCondition.repeatedFields_, - null - ); + proto.aggregator.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); }; - goog.inherits(proto.aggregator.TimeCondition, jspb.Message); + goog.inherits(proto.aggregator.CronCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; + proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; } - proto.aggregator.ContractQueryCondition = function(opt_data) { + proto.aggregator.BlockCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); + goog.inherits(proto.aggregator.BlockCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractQueryCondition.displayName = "proto.aggregator.ContractQueryCondition"; + proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; } - proto.aggregator.ExpressionCondition = function(opt_data) { + proto.aggregator.EventCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); + goog.inherits(proto.aggregator.EventCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; + } + proto.aggregator.TaskTrigger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ExpressionCondition.displayName = "proto.aggregator.ExpressionCondition"; + proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; } proto.aggregator.SyncTasksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -192,40 +178,47 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; } - proto.aggregator.ETHTransfer = function(opt_data) { + proto.aggregator.ETHTransferNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; + } + proto.aggregator.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); + goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; + proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; } - proto.aggregator.ContractExecution = function(opt_data) { + proto.aggregator.ContractQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractExecution, jspb.Message); + goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractExecution.displayName = "proto.aggregator.ContractExecution"; + proto.aggregator.ContractQueryNode.displayName = "proto.aggregator.ContractQueryNode"; } - proto.aggregator.GraphQLDataQuery = function(opt_data) { + proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); + goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLDataQuery.displayName = "proto.aggregator.GraphQLDataQuery"; + proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; } - proto.aggregator.HTTPAPICall = function(opt_data) { + proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); + goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; + proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; } - proto.aggregator.CustomCode = function(opt_data) { + proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.CustomCode, jspb.Message); + goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; + proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; } proto.aggregator.ConditionJump = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -234,33 +227,33 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; } - proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.BranchAction.repeatedFields_, - null - ); + proto.aggregator.BranchNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); }; - goog.inherits(proto.aggregator.BranchAction, jspb.Message); + goog.inherits(proto.aggregator.BranchNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; + proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; } - proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TaskAction.repeatedFields_, - null - ); + proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.FilterNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; + } + proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.TaskEdge, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; + } + proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); }; - goog.inherits(proto.aggregator.TaskAction, jspb.Message); + goog.inherits(proto.aggregator.TaskNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; + proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; } proto.aggregator.Execution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -270,28 +263,14 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; } proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.Task.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); }; goog.inherits(proto.aggregator.Task, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.Task.displayName = "proto.aggregator.Task"; } proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.CreateTaskReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -325,9 +304,16 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; } - proto.aggregator.AddressResp = function(opt_data) { + proto.aggregator.SmartWallet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; + goog.inherits(proto.aggregator.SmartWallet, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; + } + proto.aggregator.AddressResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); + }; goog.inherits(proto.aggregator.AddressResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; @@ -340,26 +326,12 @@ var init_avs_pb = __esm({ proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; } proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.ListTasksResp.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); }; goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; } - proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.TaskItemResp.displayName = "proto.aggregator.ListTasksResp.TaskItemResp"; - } proto.aggregator.GetKeyReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; @@ -375,14 +347,7 @@ var init_avs_pb = __esm({ proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; } proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.UpdateChecksReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -395,6 +360,20 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; } + proto.aggregator.CreateWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; + } + proto.aggregator.CreateWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; + } if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.UUID.toObject(opt_includeInstance, this); @@ -444,7 +423,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getBytes(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.UUID.prototype.getBytes = function() { @@ -511,10 +493,7 @@ var init_avs_pb = __esm({ break; case 4: var value = new proto.aggregator.Checkin.Status(); - reader.readMessage( - value, - proto.aggregator.Checkin.Status.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); msg.setStatus(value); break; case 5: @@ -554,15 +533,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getStatus(); if (f != null) { @@ -574,15 +562,24 @@ var init_avs_pb = __esm({ } f = message.getVersion(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 5, + f + ); } f = message.getMetricsport(); if (f !== 0) { - writer.writeInt32(6, f); + writer.writeInt32( + 6, + f + ); } f = message.getRemoteip(); if (f.length > 0) { - writer.writeString(7, f); + writer.writeString( + 7, + f + ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -604,10 +601,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -632,10 +626,7 @@ var init_avs_pb = __esm({ break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastHeartbeat(value); break; default: @@ -654,11 +645,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getUptime(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getQueuedepth(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getLastHeartbeat(); if (f != null) { @@ -690,11 +687,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 3 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) ); }; proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { @@ -803,10 +796,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: @@ -835,11 +825,7 @@ var init_avs_pb = __esm({ proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) ); }; proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { @@ -924,19 +910,31 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getMonotonicClock(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); } }; proto.aggregator.SyncTasksReq.prototype.getId = function() { @@ -975,16 +973,14 @@ var init_avs_pb = __esm({ proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; + proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); + proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { var f, obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - schedule: (f = msg.getSchedule()) && proto.aggregator.TimeCondition.toObject(includeInstance, f), - contractQuery: (f = msg.getContractQuery()) && proto.aggregator.ContractQueryCondition.toObject(includeInstance, f), - expression: (f = msg.getExpression()) && proto.aggregator.ExpressionCondition.toObject(includeInstance, f) + epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -992,12 +988,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { + proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.FixedEpochCondition(); + return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1005,35 +1001,13 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = ( - /** @type {!proto.aggregator.TriggerType} */ - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: - var value = new proto.aggregator.TimeCondition(); - reader.readMessage( - value, - proto.aggregator.TimeCondition.deserializeBinaryFromReader - ); - msg.setSchedule(value); - break; - case 3: - var value = new proto.aggregator.ContractQueryCondition(); - reader.readMessage( - value, - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader - ); - msg.setContractQuery(value); - break; - case 4: - var value = new proto.aggregator.ExpressionCondition(); - reader.readMessage( - value, - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader + var values = ( + /** @type {!Array} */ + reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] ); - msg.setExpression(value); + for (var i = 0; i < values.length; i++) { + msg.addEpoches(values[i]); + } break; default: reader.skipField(); @@ -1042,109 +1016,44 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum(1, f); - } - f = message.getSchedule(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.TimeCondition.serializeBinaryToWriter - ); - } - f = message.getContractQuery(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter - ); - } - f = message.getExpression(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.ExpressionCondition.serializeBinaryToWriter + f = message.getEpochesList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f ); } }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return ( - /** @type{?proto.aggregator.TimeCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); - }; - proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return ( - /** @type{?proto.aggregator.ContractQueryCondition} */ - jspb.Message.getWrapperField( - this, - proto.aggregator.ContractQueryCondition, - 3 - ) - ); - }; - proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getExpression = function() { + proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { return ( - /** @type{?proto.aggregator.ExpressionCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(void 0); + proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; + proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { + return this.setEpochesList([]); }; - proto.aggregator.TimeCondition.repeatedFields_ = [1]; + proto.aggregator.CronCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); + proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { + proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") + cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1152,15 +1061,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TimeCondition.deserializeBinary = function(bytes) { + proto.aggregator.CronCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TimeCondition(); - return proto.aggregator.TimeCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.CronCondition(); + return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1168,20 +1074,11 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var values = ( - /** @type {!Array} */ - reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] - ); - for (var i = 0; i < values.length; i++) { - msg.addFixed(values[i]); - } - break; - case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setCron(value); + msg.addCronTable(value); break; default: reader.skipField(); @@ -1190,57 +1087,43 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TimeCondition.prototype.serializeBinary = function() { + proto.aggregator.CronCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64(1, f); - } - f = message.getCron(); + f = message.getCronTableList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedString( + 1, + f + ); } }; - proto.aggregator.TimeCondition.prototype.getFixedList = function() { + proto.aggregator.CronCondition.prototype.getCronTableList = function() { return ( - /** @type {!Array} */ + /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { + proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.TimeCondition.prototype.addFixed = function(value, opt_index) { + proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); - }; - proto.aggregator.TimeCondition.prototype.getCron = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + proto.aggregator.CronCondition.prototype.clearCronTableList = function() { + return this.setCronTableList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryCondition.toObject( - opt_includeInstance, - this - ); + proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractQueryCondition.toObject = function(includeInstance, msg) { + proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, "") + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1248,15 +1131,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) { + proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryCondition(); - return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.BlockCondition(); + return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1265,17 +1145,10 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() + /** @type {number} */ + reader.readInt64() ); - msg.setCallmsg(value); + msg.setInterval(value); break; default: reader.skipField(); @@ -1284,51 +1157,35 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() { + proto.aggregator.BlockCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter( - this, - writer - ); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); } }; - proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { + proto.aggregator.BlockCondition.prototype.getInterval = function() { return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ExpressionCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ExpressionCondition.toObject( - opt_includeInstance, - this - ); + proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { + proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { var f, obj = { expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -1338,15 +1195,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) { + proto.aggregator.EventCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ExpressionCondition(); - return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.EventCondition(); + return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1367,36 +1221,57 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ExpressionCondition.prototype.serializeBinary = function() { + proto.aggregator.EventCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; - proto.aggregator.ExpressionCondition.prototype.getExpression = function() { + proto.aggregator.EventCondition.prototype.getExpression = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { + proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]]; + proto.aggregator.TaskTrigger.TriggerConditionCase = { + TRIGGER_CONDITION_NOT_SET: 0, + MANUAL: 2, + AT: 3, + CRON: 4, + BLOCK: 5, + EVENT: 6 + }; + proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { + return ( + /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) + ); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); }; - proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1404,15 +1279,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.TaskTrigger(); + return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1421,24 +1293,229 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() + /** @type {!proto.aggregator.TriggerType} */ + reader.readEnum() ); - msg.setId(value); + msg.setTriggerType(value); break; case 2: var value = ( - /** @type {string} */ - reader.readString() + /** @type {boolean} */ + reader.readBool() + ); + msg.setManual(value); + break; + case 3: + var value = new proto.aggregator.FixedEpochCondition(); + reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setAt(value); + break; + case 4: + var value = new proto.aggregator.CronCondition(); + reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 5: + var value = new proto.aggregator.BlockCondition(); + reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 6: + var value = new proto.aggregator.EventCondition(); + reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTriggerType(); + if (f !== 0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ + jspb.Message.getField(message, 2); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = message.getAt(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { + return ( + /** @type {!proto.aggregator.TriggerType} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); + }; + proto.aggregator.TaskTrigger.prototype.getManual = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 2, false) + ); + }; + proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 2) != null; + }; + proto.aggregator.TaskTrigger.prototype.getAt = function() { + return ( + /** @type{?proto.aggregator.FixedEpochCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3) + ); + }; + proto.aggregator.TaskTrigger.prototype.setAt = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearAt = function() { + return this.setAt(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasAt = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.TaskTrigger.prototype.getCron = function() { + return ( + /** @type{?proto.aggregator.CronCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4) + ); + }; + proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return ( + /** @type{?proto.aggregator.BlockCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5) + ); + }; + proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 5) != null; + }; + proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return ( + /** @type{?proto.aggregator.EventCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6) + ); + }; + proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 6) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksResp(); + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() ); msg.setChecktype(value); break; case 3: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); break; default: @@ -1457,11 +1534,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getChecktype(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getTrigger(); if (f != null) { @@ -1506,10 +1589,10 @@ var init_avs_pb = __esm({ return jspb.Message.getField(this, 3) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); + proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { + proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { destination: jspb.Message.getFieldWithDefault(msg, 1, ""), amount: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1520,12 +1603,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { + proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer(); - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ETHTransferNode(); + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1553,53 +1636,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { + proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getDestination(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAmount(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.ETHTransfer.prototype.getDestination = function() { + proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { + proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ETHTransfer.prototype.getAmount = function() { + proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { + proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) { + proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { var f, obj = { contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - encodedParams: jspb.Message.getFieldWithDefault(msg, 4, "") + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1607,15 +1692,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { + proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractExecution(); - return proto.aggregator.ContractExecution.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ContractWriteNode(); + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1641,14 +1723,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setMethod(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setEncodedParams(value); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -1657,74 +1732,179 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ContractExecution.prototype.serializeBinary = function() { + proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getCallData(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getEncodedParams(); + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(4, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.ContractExecution.prototype.getContractAddress = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ContractExecution.prototype.getCallData = function() { + proto.aggregator.ContractWriteNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ContractExecution.prototype.setCallData = function(value) { + proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.ContractExecution.prototype.getMethod = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.ContractExecution.prototype.setMethod = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ContractQueryNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ContractQueryNode(); + return proto.aggregator.ContractQueryNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ContractQueryNode.prototype.getCallData = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject( - opt_includeInstance, - this - ); + proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; - proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { + proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), query: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1735,15 +1915,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { + proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLDataQuery(); - return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.GraphQLQueryNode(); + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1771,49 +1948,56 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { + proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getQuery(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { + proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { + proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { + proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { + proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); + proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; - proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { + proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, "") + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1821,12 +2005,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { + proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.HTTPAPICall(); - return proto.aggregator.HTTPAPICall.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.RestAPINode(); + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1843,15 +2027,7 @@ var init_avs_pb = __esm({ case 2: var value = msg.getHeadersMap(); reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary( - message, - reader2, - jspb.BinaryReader.prototype.readString, - jspb.BinaryReader.prototype.readString, - null, - "", - "" - ); + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 3: @@ -1861,6 +2037,13 @@ var init_avs_pb = __esm({ ); msg.setBody(value); break; + case 4: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMethod(value); + break; default: reader.skipField(); break; @@ -1868,67 +2051,89 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { + proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getHeadersMap(true); if (f && f.getLength() > 0) { - f.serializeBinary( - 2, - writer, - jspb.BinaryWriter.prototype.writeString, - jspb.BinaryWriter.prototype.writeString - ); + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getBody(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); } }; - proto.aggregator.HTTPAPICall.prototype.getUrl = function() { + proto.aggregator.RestAPINode.prototype.getUrl = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { + proto.aggregator.RestAPINode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { + proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { return ( /** @type {!jspb.Map} */ - jspb.Message.getMapField(this, 2, opt_noLazyCreate, null) + jspb.Message.getMapField( + this, + 2, + opt_noLazyCreate, + null + ) ); }; - proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { + proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { this.getHeadersMap().clear(); return this; }; - proto.aggregator.HTTPAPICall.prototype.getBody = function() { + proto.aggregator.RestAPINode.prototype.getBody = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { + proto.aggregator.RestAPINode.prototype.setBody = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + proto.aggregator.RestAPINode.prototype.getMethod = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); + proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; - proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { + proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1936,12 +2141,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.CustomCode.deserializeBinary = function(bytes) { + proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCode(); - return proto.aggregator.CustomCode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CustomCodeNode(); + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1960,7 +2165,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setBody(value); + msg.setSource(value); break; default: reader.skipField(); @@ -1969,38 +2174,44 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.CustomCode.prototype.serializeBinary = function() { + proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getType(); if (f !== 0) { - writer.writeEnum(1, f); + writer.writeEnum( + 1, + f + ); } - f = message.getBody(); + f = message.getSource(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.CustomCode.prototype.getType = function() { + proto.aggregator.CustomCodeNode.prototype.getType = function() { return ( /** @type {!proto.aggregator.CustomCodeType} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.CustomCode.prototype.setType = function(value) { + proto.aggregator.CustomCodeNode.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; - proto.aggregator.CustomCode.prototype.getBody = function() { + proto.aggregator.CustomCodeNode.prototype.getSource = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.CustomCode.prototype.setBody = function(value) { + proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2021,10 +2232,7 @@ var init_avs_pb = __esm({ proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -2063,11 +2271,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getNext(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; proto.aggregator.ConditionJump.prototype.getExpression = function() { @@ -2088,12 +2302,12 @@ var init_avs_pb = __esm({ proto.aggregator.ConditionJump.prototype.setNext = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchAction.repeatedFields_ = [2]; + proto.aggregator.BranchNode.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); + proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; - proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { + proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), elseifsList: jspb.Message.toObjectList( @@ -2109,12 +2323,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.BranchAction.deserializeBinary = function(bytes) { + proto.aggregator.BranchNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.BranchNode(); + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2123,26 +2337,17 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); msg.setIf(value); break; case 2: var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); msg.addElseifs(value); break; case 3: var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); msg.setElse(value); break; default: @@ -2152,12 +2357,12 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.BranchAction.prototype.serializeBinary = function() { + proto.aggregator.BranchNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getIf(); if (f != null) { @@ -2184,78 +2389,262 @@ var init_avs_pb = __esm({ ); } }; - proto.aggregator.BranchAction.prototype.getIf = function() { + proto.aggregator.BranchNode.prototype.getIf = function() { return ( /** @type{?proto.aggregator.ConditionJump} */ jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) ); }; - proto.aggregator.BranchAction.prototype.setIf = function(value) { + proto.aggregator.BranchNode.prototype.setIf = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; - proto.aggregator.BranchAction.prototype.clearIf = function() { + proto.aggregator.BranchNode.prototype.clearIf = function() { return this.setIf(void 0); }; - proto.aggregator.BranchAction.prototype.hasIf = function() { + proto.aggregator.BranchNode.prototype.hasIf = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.BranchAction.prototype.getElseifsList = function() { + proto.aggregator.BranchNode.prototype.getElseifsList = function() { return ( /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ConditionJump, - 2 - ) + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2) ); }; - proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { + proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; - proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.ConditionJump, - opt_index - ); + proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); }; - proto.aggregator.BranchAction.prototype.clearElseifsList = function() { + proto.aggregator.BranchNode.prototype.clearElseifsList = function() { return this.setElseifsList([]); }; - proto.aggregator.BranchAction.prototype.getElse = function() { + proto.aggregator.BranchNode.prototype.getElse = function() { return ( /** @type{?proto.aggregator.ConditionJump} */ jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) ); }; - proto.aggregator.BranchAction.prototype.setElse = function(value) { + proto.aggregator.BranchNode.prototype.setElse = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; - proto.aggregator.BranchAction.prototype.clearElse = function() { + proto.aggregator.BranchNode.prototype.clearElse = function() { return this.setElse(void 0); }; - proto.aggregator.BranchAction.prototype.hasElse = function() { + proto.aggregator.BranchNode.prototype.hasElse = function() { return jspb.Message.getField(this, 3) != null; }; - proto.aggregator.TaskAction.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); + proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); }; - proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { + proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { var f, obj = { - taskType: jspb.Message.getFieldWithDefault(msg, 1, 0), + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode(); + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.FilterNode.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge(); + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.TaskEdge.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TaskEdge.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.TaskEdge.prototype.getTarget = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17]]; + proto.aggregator.TaskNode.TaskBodyCase = { + TASK_BODY_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + CUSTOM_CODE: 17 + }; + proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { + return ( + /** @type {proto.aggregator.TaskNode.TaskBodyCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) + ); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { + var f, obj = { + nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 3, ""), - nextList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? void 0 : f, - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: (f = msg.getContractExecution()) && proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: (f = msg.getHttpDataQuery()) && proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchAction.toObject(includeInstance, f) + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractQueryNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2263,12 +2652,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TaskAction.deserializeBinary = function(bytes) { + proto.aggregator.TaskNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskNode(); + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2280,7 +2669,7 @@ var init_avs_pb = __esm({ /** @type {!proto.aggregator.TaskType} */ reader.readEnum() ); - msg.setTaskType(value); + msg.setNodeType(value); break; case 2: var value = ( @@ -2296,61 +2685,46 @@ var init_avs_pb = __esm({ ); msg.setName(value); break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addNext(value); - break; case 10: - var value = new proto.aggregator.ETHTransfer(); - reader.readMessage( - value, - proto.aggregator.ETHTransfer.deserializeBinaryFromReader - ); + var value = new proto.aggregator.ETHTransferNode(); + reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); msg.setEthTransfer(value); break; case 11: - var value = new proto.aggregator.ContractExecution(); - reader.readMessage( - value, - proto.aggregator.ContractExecution.deserializeBinaryFromReader - ); - msg.setContractExecution(value); + var value = new proto.aggregator.ContractWriteNode(); + reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.GraphQLDataQuery(); - reader.readMessage( - value, - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader - ); - msg.setGraphqlDataQuery(value); + var value = new proto.aggregator.ContractQueryNode(); + reader.readMessage(value, proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + msg.setContractRead(value); break; case 13: - var value = new proto.aggregator.HTTPAPICall(); - reader.readMessage( - value, - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader - ); - msg.setHttpDataQuery(value); + var value = new proto.aggregator.GraphQLQueryNode(); + reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); break; case 14: - var value = new proto.aggregator.CustomCode(); - reader.readMessage( - value, - proto.aggregator.CustomCode.deserializeBinaryFromReader - ); - msg.setCustomCode(value); + var value = new proto.aggregator.RestAPINode(); + reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); break; case 15: - var value = new proto.aggregator.BranchAction(); - reader.readMessage( - value, - proto.aggregator.BranchAction.deserializeBinaryFromReader - ); + var value = new proto.aggregator.BranchNode(); + reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); msg.setBranch(value); break; + case 16: + var value = new proto.aggregator.FilterNode(); + reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.CustomCodeNode(); + reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; default: reader.skipField(); break; @@ -2358,67 +2732,72 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TaskAction.prototype.serializeBinary = function() { + proto.aggregator.TaskNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTaskType(); + f = message.getNodeType(); if (f !== 0) { - writer.writeEnum(1, f); + writer.writeEnum( + 1, + f + ); } f = message.getId(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getNextList(); + f = message.getName(); if (f.length > 0) { - writer.writeRepeatedString(4, f); + writer.writeString( + 3, + f + ); } f = message.getEthTransfer(); if (f != null) { writer.writeMessage( 10, f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + proto.aggregator.ETHTransferNode.serializeBinaryToWriter ); } - f = message.getContractExecution(); + f = message.getContractWrite(); if (f != null) { writer.writeMessage( 11, f, - proto.aggregator.ContractExecution.serializeBinaryToWriter + proto.aggregator.ContractWriteNode.serializeBinaryToWriter ); } - f = message.getGraphqlDataQuery(); + f = message.getContractRead(); if (f != null) { writer.writeMessage( 12, f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter + proto.aggregator.ContractQueryNode.serializeBinaryToWriter ); } - f = message.getHttpDataQuery(); + f = message.getGraphqlDataQuery(); if (f != null) { writer.writeMessage( 13, f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getRestApi(); if (f != null) { writer.writeMessage( 14, f, - proto.aggregator.CustomCode.serializeBinaryToWriter + proto.aggregator.RestAPINode.serializeBinaryToWriter ); } f = message.getBranch(); @@ -2426,142 +2805,173 @@ var init_avs_pb = __esm({ writer.writeMessage( 15, f, - proto.aggregator.BranchAction.serializeBinaryToWriter + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter ); } }; - proto.aggregator.TaskAction.prototype.getTaskType = function() { + proto.aggregator.TaskNode.prototype.getNodeType = function() { return ( /** @type {!proto.aggregator.TaskType} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.TaskAction.prototype.setTaskType = function(value) { + proto.aggregator.TaskNode.prototype.setNodeType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; - proto.aggregator.TaskAction.prototype.getId = function() { + proto.aggregator.TaskNode.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.TaskAction.prototype.setId = function(value) { + proto.aggregator.TaskNode.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.TaskAction.prototype.getName = function() { + proto.aggregator.TaskNode.prototype.getName = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.TaskAction.prototype.setName = function(value) { + proto.aggregator.TaskNode.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.TaskAction.prototype.getNextList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 4) - ); - }; - proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); - }; - proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); - }; - proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); - }; - proto.aggregator.TaskAction.prototype.getEthTransfer = function() { + proto.aggregator.TaskNode.prototype.getEthTransfer = function() { return ( - /** @type{?proto.aggregator.ETHTransfer} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) + /** @type{?proto.aggregator.ETHTransferNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) ); }; - proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { + proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { return this.setEthTransfer(void 0); }; - proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { + proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { return jspb.Message.getField(this, 10) != null; }; - proto.aggregator.TaskAction.prototype.getContractExecution = function() { + proto.aggregator.TaskNode.prototype.getContractWrite = function() { return ( - /** @type{?proto.aggregator.ContractExecution} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) + /** @type{?proto.aggregator.ContractWriteNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) ); }; - proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); + proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(void 0); + proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(void 0); }; - proto.aggregator.TaskAction.prototype.hasContractExecution = function() { + proto.aggregator.TaskNode.prototype.hasContractWrite = function() { return jspb.Message.getField(this, 11) != null; }; - proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.getContractRead = function() { return ( - /** @type{?proto.aggregator.GraphQLDataQuery} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) + /** @type{?proto.aggregator.ContractQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12) ); }; - proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); + proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(void 0); }; - proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasContractRead = function() { return jspb.Message.getField(this, 12) != null; }; - proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { return ( - /** @type{?proto.aggregator.HTTPAPICall} */ - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) + /** @type{?proto.aggregator.GraphQLQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) ); }; - proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); + proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(void 0); }; - proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { return jspb.Message.getField(this, 13) != null; }; - proto.aggregator.TaskAction.prototype.getCustomCode = function() { + proto.aggregator.TaskNode.prototype.getRestApi = function() { return ( - /** @type{?proto.aggregator.CustomCode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) + /** @type{?proto.aggregator.RestAPINode} */ + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) ); }; - proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); + proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(void 0); }; - proto.aggregator.TaskAction.prototype.hasCustomCode = function() { + proto.aggregator.TaskNode.prototype.hasRestApi = function() { return jspb.Message.getField(this, 14) != null; }; - proto.aggregator.TaskAction.prototype.getBranch = function() { + proto.aggregator.TaskNode.prototype.getBranch = function() { return ( - /** @type{?proto.aggregator.BranchAction} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) + /** @type{?proto.aggregator.BranchNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) ); }; - proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); + proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearBranch = function() { + proto.aggregator.TaskNode.prototype.clearBranch = function() { return this.setBranch(void 0); }; - proto.aggregator.TaskAction.prototype.hasBranch = function() { + proto.aggregator.TaskNode.prototype.hasBranch = function() { return jspb.Message.getField(this, 15) != null; }; + proto.aggregator.TaskNode.prototype.getFilter = function() { + return ( + /** @type{?proto.aggregator.FilterNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) + ); + }; + proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(void 0); + }; + proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; + }; + proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return ( + /** @type{?proto.aggregator.CustomCodeNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(void 0); + }; + proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 17) != null; + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Execution.toObject(opt_includeInstance, this); @@ -2627,15 +3037,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getEpoch(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getUserOpHash(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getError(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.Execution.prototype.getEpoch = function() { @@ -2665,7 +3084,7 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.prototype.setError = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.Task.repeatedFields_ = [5, 12]; + proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Task.toObject(opt_includeInstance, this); @@ -2674,19 +3093,24 @@ var init_avs_pb = __esm({ var f, obj = { id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), + memo: jspb.Message.getFieldWithDefault(msg, 7, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + status: jspb.Message.getFieldWithDefault(msg, 9, 0), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), nodesList: jspb.Message.toObjectList( msg.getNodesList(), - proto.aggregator.TaskAction.toObject, + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance ), - startAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 9, 0), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), executionsList: jspb.Message.toObjectList( msg.getExecutionsList(), proto.aggregator.Execution.toObject, @@ -2713,10 +3137,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.UUID(); - reader.readMessage( - value, - proto.aggregator.UUID.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.UUID.deserializeBinaryFromReader); msg.setId(value); break; case 2: @@ -2731,46 +3152,30 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); - break; - case 4: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); - msg.setTrigger(value); + msg.setSmartWalletAddress(value); break; case 5: - var value = new proto.aggregator.TaskAction(); - reader.readMessage( - value, - proto.aggregator.TaskAction.deserializeBinaryFromReader - ); - msg.addNodes(value); - break; - case 6: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 7: + case 6: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; - case 8: + case 7: var value = ( /** @type {string} */ reader.readString() ); msg.setMemo(value); break; - case 9: + case 8: var value = ( /** @type {number} */ reader.readInt64() @@ -2778,25 +3183,37 @@ var init_avs_pb = __esm({ msg.setCompletedAt(value); break; case 10: + var value = ( + /** @type {boolean} */ + reader.readBool() + ); + msg.setRecurring(value); + break; + case 9: var value = ( /** @type {!proto.aggregator.TaskStatus} */ reader.readEnum() ); msg.setStatus(value); break; + case 4: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; case 11: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); break; case 12: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: var value = new proto.aggregator.Execution(); - reader.readMessage( - value, - proto.aggregator.Execution.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); msg.addExecutions(value); break; default: @@ -2815,61 +3232,97 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f != null) { - writer.writeMessage(1, f, proto.aggregator.UUID.serializeBinaryToWriter); + writer.writeMessage( + 1, + f, + proto.aggregator.UUID.serializeBinaryToWriter + ); } f = message.getOwner(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + writer.writeString( + 2, + f ); } - f = message.getNodesList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 3, + f ); } f = message.getStartAt(); if (f !== 0) { - writer.writeInt64(6, f); + writer.writeInt64( + 5, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(7, f); + writer.writeInt64( + 6, + f + ); } f = message.getMemo(); if (f.length > 0) { - writer.writeString(8, f); + writer.writeString( + 7, + f + ); } f = message.getCompletedAt(); if (f !== 0) { - writer.writeInt64(9, f); + writer.writeInt64( + 8, + f + ); + } + f = message.getRecurring(); + if (f) { + writer.writeBool( + 10, + f + ); } f = message.getStatus(); if (f !== 0) { - writer.writeEnum(10, f); + writer.writeEnum( + 9, + f + ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool(11, f); + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); } - f = message.getExecutionsList(); + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); if (f.length > 0) { writer.writeRepeatedMessage( 12, f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + f = message.getExecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, proto.aggregator.Execution.serializeBinaryToWriter ); } @@ -2898,127 +3351,130 @@ var init_avs_pb = __esm({ proto.aggregator.Task.prototype.setOwner = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.Task.prototype.getSmartAccountAddress = function() { + proto.aggregator.Task.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { + proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); - }; - proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 5, - opt_value, - proto.aggregator.TaskAction, - opt_index - ); - }; - proto.aggregator.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; proto.aggregator.Task.prototype.getStartAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) + jspb.Message.getFieldWithDefault(this, 5, 0) ); }; proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 5, value); }; proto.aggregator.Task.prototype.getExpiredAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) + jspb.Message.getFieldWithDefault(this, 6, 0) ); }; proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); + return jspb.Message.setProto3IntField(this, 6, value); }; proto.aggregator.Task.prototype.getMemo = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 8, "") + jspb.Message.getFieldWithDefault(this, 7, "") ); }; proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 7, value); }; proto.aggregator.Task.prototype.getCompletedAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 9, 0) + jspb.Message.getFieldWithDefault(this, 8, 0) ); }; proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 8, value); + }; + proto.aggregator.Task.prototype.getRecurring = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 10, false) + ); + }; + proto.aggregator.Task.prototype.setRecurring = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); }; proto.aggregator.Task.prototype.getStatus = function() { return ( /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 10, 0) + jspb.Message.getFieldWithDefault(this, 9, 0) ); }; proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); + return jspb.Message.setProto3EnumField(this, 9, value); }; - proto.aggregator.Task.prototype.getRepeatable = function() { + proto.aggregator.Task.prototype.getTrigger = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 11, false) + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) + ); + }; + proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 4, value); + }; + proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.Task.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) + ); + }; + proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); + }; + proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.Task.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) ); }; - proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); + proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); + }; + proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; proto.aggregator.Task.prototype.getExecutionsList = function() { return ( /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) ); }; proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 12, - opt_value, - proto.aggregator.Execution, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; proto.aggregator.Task.prototype.clearExecutionsList = function() { return this.setExecutionsList([]); }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; + proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); @@ -3026,15 +3482,21 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { var f, obj = { trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + nodesList: jspb.Message.toObjectList( + msg.getNodesList(), + proto.aggregator.TaskNode.toObject, includeInstance ), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3045,10 +3507,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3059,47 +3518,53 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); break; case 2: - var value = new proto.aggregator.TaskAction(); - reader.readMessage( - value, - proto.aggregator.TaskAction.deserializeBinaryFromReader - ); - msg.addActions(value); - break; - case 3: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 4: + case 3: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; + case 4: + var value = ( + /** @type {boolean} */ + reader.readBool() + ); + msg.setRepeatable(value); + break; case 5: var value = ( /** @type {string} */ reader.readString() ); - msg.setMemo(value); + msg.setSmartWalletAddress(value); break; case 6: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {string} */ + reader.readString() ); - msg.setRepeatable(value); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -3123,29 +3588,56 @@ var init_avs_pb = __esm({ proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getActionsList(); + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getRepeatable(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, + 7, f, - proto.aggregator.TaskAction.serializeBinaryToWriter + proto.aggregator.TaskNode.serializeBinaryToWriter ); } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64(3, f); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64(4, f); - } - f = message.getMemo(); + f = message.getEdgesList(); if (f.length > 0) { - writer.writeString(5, f); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool(6, f); + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); } }; proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { @@ -3163,62 +3655,80 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { + proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.TaskAction, - opt_index + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); + proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 4, false) ); }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + proto.aggregator.CreateTaskReq.prototype.getMemo = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 6, false) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") ); }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); + proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); + }; + proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); + }; + proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { @@ -3237,10 +3747,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3272,7 +3779,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.CreateTaskResp.prototype.getId = function() { @@ -3333,7 +3843,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceRequest.prototype.getOwner = function() { @@ -3394,7 +3907,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getNonce(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceResp.prototype.getNonce = function() { @@ -3412,7 +3928,8 @@ var init_avs_pb = __esm({ }; proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3423,10 +3940,7 @@ var init_avs_pb = __esm({ proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3440,7 +3954,14 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setOwner(value); + msg.setFactory(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); break; default: reader.skipField(); @@ -3456,28 +3977,48 @@ var init_avs_pb = __esm({ }; proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getOwner(); + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.AddressRequest.prototype.getOwner = function() { + proto.aggregator.AddressRequest.prototype.getFactory = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressRequest.prototype.setOwner = function(value) { + proto.aggregator.AddressRequest.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.AddressRequest.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.AddressRequest.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); + proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3485,12 +4026,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { + proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SmartWallet(); + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3502,14 +4043,21 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); + msg.setAddress(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setNonce(value); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); break; default: reader.skipField(); @@ -3518,64 +4066,98 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { + proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getSmartAccountAddress(); + f = message.getAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getNonce(); + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { + proto.aggregator.SmartWallet.prototype.getAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { + proto.aggregator.SmartWallet.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.AddressResp.prototype.getNonce = function() { + proto.aggregator.SmartWallet.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.AddressResp.prototype.setNonce = function(value) { + proto.aggregator.SmartWallet.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.SmartWallet.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.AddressResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); + proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); }; - proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = {}; + proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList( + msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, + includeInstance + ) + }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } - proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { + proto.aggregator.AddressResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.AddressResp(); + return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet(); + reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; default: reader.skipField(); break; @@ -3583,26 +4165,44 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { + proto.aggregator.AddressResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { var f = void 0; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } + }; + proto.aggregator.AddressResp.prototype.getWalletsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) + ); + }; + proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); + }; + proto.aggregator.AddressResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); }; - proto.aggregator.ListTasksResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); + proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); }; - proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { + proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { var f, obj = { - tasksList: jspb.Message.toObjectList( - msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, - includeInstance - ) + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3610,15 +4210,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { + proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ListTasksReq(); + return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3626,12 +4223,11 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage( - value, - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.addTasks(value); + msg.setSmartWalletAddress(value); break; default: reader.skipField(); @@ -3640,33 +4236,42 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { + proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTasksList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter + f ); } }; + proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ListTasksResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); }; - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { + proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) + tasksList: jspb.Message.toObjectList( + msg.getTasksList(), + proto.aggregator.Task.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3674,15 +4279,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { + proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ListTasksResp(); + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3690,18 +4292,9 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); + var value = new proto.aggregator.Task(); + reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); break; default: reader.skipField(); @@ -3710,64 +4303,33 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { + proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum(2, f); - } - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); + proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTasksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); + } }; proto.aggregator.ListTasksResp.prototype.getTasksList = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ListTasksResp.TaskItemResp, - 1 - ) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) ); }; proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.aggregator.ListTasksResp.TaskItemResp, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { return this.setTasksList([]); @@ -3837,15 +4399,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.GetKeyReq.prototype.getOwner = function() { @@ -3924,7 +4495,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getKey(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.KeyResp.prototype.getKey = function() { @@ -3956,10 +4530,7 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -4005,15 +4576,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getIdList(); if (f.length > 0) { - writer.writeRepeatedString(3, f); + writer.writeRepeatedString( + 3, + f + ); } }; proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { @@ -4051,10 +4631,7 @@ var init_avs_pb = __esm({ }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject( - opt_includeInstance, - this - ); + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); }; proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { var f, obj = { @@ -4069,10 +4646,7 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -4083,10 +4657,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: @@ -4115,11 +4686,7 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) ); }; proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { @@ -4131,18 +4698,174 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletReq(); + return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 + proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CreateWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletResp(); + return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TriggerType = { + MANUALTRIGGER: 0, + FIXEDEPOCHTRIGGER: 1, + CRONTRIGGER: 2, + BLOCKTRIGGER: 3, + EVENTTRIGGER: 4 + }; + proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1e3, + STORAGEUNAVAILABLE: 2e3, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6e3, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7e3, + TASKDATAMISSINGERROR: 7001 }; proto.aggregator.TaskStatus = { ACTIVE: 0, @@ -4154,28 +4877,356 @@ var init_avs_pb = __esm({ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; - goog.object.extend(exports, proto.aggregator); - ({ - Task, - CreateTaskReq, - CreateTaskResp, - GetKeyReq, - KeyResp, - UpdateChecksReq, - UpdateChecksResp, - AddressResp, - AddressRequest, - ListTasksReq, - ListTasksResp, - TaskTrigger, - TriggerType, - ExpressionCondition, - TaskAction, - ActionType, - ContractExecution, - TaskType, - UUID - } = proto.aggregator); + proto.aggregator.TaskType = { + ETHTRANSFERTASK: 0, + CONTRACTWRITETASK: 1, + CONTRACTREADTASK: 2, + GRAPHQLDATAQUERYTASK: 3, + RESTAPITASK: 4, + BRANCHTASK: 5, + FILTERTASK: 6, + CUSTOMCODETASK: 7 + }; + goog.object.extend(exports2, proto.aggregator); + } +}); + +// grpc_codegen/avs_grpc_pb.js +var require_avs_grpc_pb = __commonJS({ + "grpc_codegen/avs_grpc_pb.js"(exports2) { + "use strict"; + var grpc2 = require("@grpc/grpc-js"); + var avs_pb2 = require_avs_pb(); + var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); + function serialize_aggregator_AddressRequest(arg) { + if (!(arg instanceof avs_pb2.AddressRequest)) { + throw new Error("Expected argument of type aggregator.AddressRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_AddressRequest(buffer_arg) { + return avs_pb2.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_AddressResp(arg) { + if (!(arg instanceof avs_pb2.AddressResp)) { + throw new Error("Expected argument of type aggregator.AddressResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_AddressResp(buffer_arg) { + return avs_pb2.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Checkin(arg) { + if (!(arg instanceof avs_pb2.Checkin)) { + throw new Error("Expected argument of type aggregator.Checkin"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Checkin(buffer_arg) { + return avs_pb2.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CheckinResp(arg) { + if (!(arg instanceof avs_pb2.CheckinResp)) { + throw new Error("Expected argument of type aggregator.CheckinResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CheckinResp(buffer_arg) { + return avs_pb2.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskReq(arg) { + if (!(arg instanceof avs_pb2.CreateTaskReq)) { + throw new Error("Expected argument of type aggregator.CreateTaskReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskReq(buffer_arg) { + return avs_pb2.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskResp(arg) { + if (!(arg instanceof avs_pb2.CreateTaskResp)) { + throw new Error("Expected argument of type aggregator.CreateTaskResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskResp(buffer_arg) { + return avs_pb2.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb2.CreateWalletReq)) { + throw new Error("Expected argument of type aggregator.CreateWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb2.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb2.CreateWalletResp)) { + throw new Error("Expected argument of type aggregator.CreateWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb2.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_GetKeyReq(arg) { + if (!(arg instanceof avs_pb2.GetKeyReq)) { + throw new Error("Expected argument of type aggregator.GetKeyReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_GetKeyReq(buffer_arg) { + return avs_pb2.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_KeyResp(arg) { + if (!(arg instanceof avs_pb2.KeyResp)) { + throw new Error("Expected argument of type aggregator.KeyResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_KeyResp(buffer_arg) { + return avs_pb2.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksReq(arg) { + if (!(arg instanceof avs_pb2.ListTasksReq)) { + throw new Error("Expected argument of type aggregator.ListTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksReq(buffer_arg) { + return avs_pb2.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksResp(arg) { + if (!(arg instanceof avs_pb2.ListTasksResp)) { + throw new Error("Expected argument of type aggregator.ListTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksResp(buffer_arg) { + return avs_pb2.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceRequest(arg) { + if (!(arg instanceof avs_pb2.NonceRequest)) { + throw new Error("Expected argument of type aggregator.NonceRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceRequest(buffer_arg) { + return avs_pb2.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceResp(arg) { + if (!(arg instanceof avs_pb2.NonceResp)) { + throw new Error("Expected argument of type aggregator.NonceResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceResp(buffer_arg) { + return avs_pb2.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksReq(arg) { + if (!(arg instanceof avs_pb2.SyncTasksReq)) { + throw new Error("Expected argument of type aggregator.SyncTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksReq(buffer_arg) { + return avs_pb2.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksResp(arg) { + if (!(arg instanceof avs_pb2.SyncTasksResp)) { + throw new Error("Expected argument of type aggregator.SyncTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksResp(buffer_arg) { + return avs_pb2.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb2.Task)) { + throw new Error("Expected argument of type aggregator.Task"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Task(buffer_arg) { + return avs_pb2.Task.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UUID(arg) { + if (!(arg instanceof avs_pb2.UUID)) { + throw new Error("Expected argument of type aggregator.UUID"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UUID(buffer_arg) { + return avs_pb2.UUID.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksReq(arg) { + if (!(arg instanceof avs_pb2.UpdateChecksReq)) { + throw new Error("Expected argument of type aggregator.UpdateChecksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksReq(buffer_arg) { + return avs_pb2.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksResp(arg) { + if (!(arg instanceof avs_pb2.UpdateChecksResp)) { + throw new Error("Expected argument of type aggregator.UpdateChecksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksResp(buffer_arg) { + return avs_pb2.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_google_protobuf_BoolValue(arg) { + if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { + throw new Error("Expected argument of type google.protobuf.BoolValue"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_google_protobuf_BoolValue(buffer_arg) { + return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); + } + var AggregatorService = exports2.AggregatorService = { + // Auth + getKey: { + path: "/aggregator.Aggregator/GetKey", + requestStream: false, + responseStream: false, + requestType: avs_pb2.GetKeyReq, + responseType: avs_pb2.KeyResp, + requestSerialize: serialize_aggregator_GetKeyReq, + requestDeserialize: deserialize_aggregator_GetKeyReq, + responseSerialize: serialize_aggregator_KeyResp, + responseDeserialize: deserialize_aggregator_KeyResp + }, + // Smart Acccount + getNonce: { + path: "/aggregator.Aggregator/GetNonce", + requestStream: false, + responseStream: false, + requestType: avs_pb2.NonceRequest, + responseType: avs_pb2.NonceResp, + requestSerialize: serialize_aggregator_NonceRequest, + requestDeserialize: deserialize_aggregator_NonceRequest, + responseSerialize: serialize_aggregator_NonceResp, + responseDeserialize: deserialize_aggregator_NonceResp + }, + getSmartAccountAddress: { + path: "/aggregator.Aggregator/GetSmartAccountAddress", + requestStream: false, + responseStream: false, + requestType: avs_pb2.AddressRequest, + responseType: avs_pb2.AddressResp, + requestSerialize: serialize_aggregator_AddressRequest, + requestDeserialize: deserialize_aggregator_AddressRequest, + responseSerialize: serialize_aggregator_AddressResp, + responseDeserialize: deserialize_aggregator_AddressResp + }, + // Task Management + createWallet: { + path: "/aggregator.Aggregator/CreateWallet", + requestStream: false, + responseStream: false, + requestType: avs_pb2.CreateWalletReq, + responseType: avs_pb2.CreateWalletResp, + requestSerialize: serialize_aggregator_CreateWalletReq, + requestDeserialize: deserialize_aggregator_CreateWalletReq, + responseSerialize: serialize_aggregator_CreateWalletResp, + responseDeserialize: deserialize_aggregator_CreateWalletResp + }, + createTask: { + path: "/aggregator.Aggregator/CreateTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.CreateTaskReq, + responseType: avs_pb2.CreateTaskResp, + requestSerialize: serialize_aggregator_CreateTaskReq, + requestDeserialize: deserialize_aggregator_CreateTaskReq, + responseSerialize: serialize_aggregator_CreateTaskResp, + responseDeserialize: deserialize_aggregator_CreateTaskResp + }, + listTasks: { + path: "/aggregator.Aggregator/ListTasks", + requestStream: false, + responseStream: false, + requestType: avs_pb2.ListTasksReq, + responseType: avs_pb2.ListTasksResp, + requestSerialize: serialize_aggregator_ListTasksReq, + requestDeserialize: deserialize_aggregator_ListTasksReq, + responseSerialize: serialize_aggregator_ListTasksResp, + responseDeserialize: deserialize_aggregator_ListTasksResp + }, + getTask: { + path: "/aggregator.Aggregator/GetTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UUID, + responseType: avs_pb2.Task, + requestSerialize: serialize_aggregator_UUID, + requestDeserialize: deserialize_aggregator_UUID, + responseSerialize: serialize_aggregator_Task, + responseDeserialize: deserialize_aggregator_Task + }, + cancelTask: { + path: "/aggregator.Aggregator/CancelTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UUID, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_UUID, + requestDeserialize: deserialize_aggregator_UUID, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + deleteTask: { + path: "/aggregator.Aggregator/DeleteTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UUID, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_UUID, + requestDeserialize: deserialize_aggregator_UUID, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + // Operator endpoint + ping: { + path: "/aggregator.Aggregator/Ping", + requestStream: false, + responseStream: false, + requestType: avs_pb2.Checkin, + responseType: avs_pb2.CheckinResp, + requestSerialize: serialize_aggregator_Checkin, + requestDeserialize: deserialize_aggregator_Checkin, + responseSerialize: serialize_aggregator_CheckinResp, + responseDeserialize: deserialize_aggregator_CheckinResp + }, + syncTasks: { + path: "/aggregator.Aggregator/SyncTasks", + requestStream: false, + responseStream: true, + requestType: avs_pb2.SyncTasksReq, + responseType: avs_pb2.SyncTasksResp, + requestSerialize: serialize_aggregator_SyncTasksReq, + requestDeserialize: deserialize_aggregator_SyncTasksReq, + responseSerialize: serialize_aggregator_SyncTasksResp, + responseDeserialize: deserialize_aggregator_SyncTasksResp + }, + updateChecks: { + path: "/aggregator.Aggregator/UpdateChecks", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UpdateChecksReq, + responseType: avs_pb2.UpdateChecksResp, + requestSerialize: serialize_aggregator_UpdateChecksReq, + requestDeserialize: deserialize_aggregator_UpdateChecksReq, + responseSerialize: serialize_aggregator_UpdateChecksResp, + responseDeserialize: deserialize_aggregator_UpdateChecksResp + } + }; + exports2.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); } }); @@ -4189,327 +5240,23 @@ __export(src_exports, { module.exports = __toCommonJS(src_exports); var import_lodash = __toESM(require("lodash")); var import_ethers = require("ethers"); -var grpc2 = __toESM(require("@grpc/grpc-js")); +var grpc = __toESM(require("@grpc/grpc-js")); var import_grpc_js = require("@grpc/grpc-js"); // src/auth.ts -var getKeyRequestMessage = (address, expiredAt) => { - return `key request for ${address} expired at ${expiredAt}`; -}; - -// grpc_codegen/avs_grpc_pb.js -var grpc = require("@grpc/grpc-js"); -var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports)); -var google_protobuf_timestamp_pb2 = require("google-protobuf/google/protobuf/timestamp_pb.js"); -var google_protobuf_wrappers_pb2 = require("google-protobuf/google/protobuf/wrappers_pb.js"); -function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb.AddressRequest)) { - throw new Error("Expected argument of type aggregator.AddressRequest"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb.AddressResp)) { - throw new Error("Expected argument of type aggregator.AddressResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb.Checkin)) { - throw new Error("Expected argument of type aggregator.Checkin"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb.GetKeyReq)) { - throw new Error("Expected argument of type aggregator.GetKeyReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb.KeyResp)) { - throw new Error("Expected argument of type aggregator.KeyResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb.NonceRequest)) { - throw new Error("Expected argument of type aggregator.NonceRequest"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error("Expected argument of type aggregator.Task"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Task(buffer_arg) { - return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb.UUID)) { - throw new Error("Expected argument of type aggregator.UUID"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb.UUID.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb.UpdateChecksReq)) { - throw new Error("Expected argument of type aggregator.UpdateChecksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb2.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb2.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); -} -var AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb.GetKeyReq, - responseType: avs_pb.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb.NonceRequest, - responseType: avs_pb.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - requestStream: false, - responseStream: false, - requestType: avs_pb.AddressRequest, - responseType: avs_pb.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.CreateTaskReq, - responseType: avs_pb.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb.ListTasksReq, - responseType: avs_pb.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb.Checkin, - responseType: avs_pb.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp - } +var getKeyRequestMessage = (address2, expiredAt) => { + return `key request for ${address2} expired at ${expiredAt}`; }; -var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); // src/index.ts -init_avs_pb(); +var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); +var avs_pb = __toESM(require_avs_pb()); // src/types.ts var AUTH_KEY_HEADER = "authKey"; // src/task.ts -var Task2 = class { +var Task = class { // Add other missing properties here constructor(task) { this.id = task.getId()?.toString() || ""; @@ -4534,15 +5281,15 @@ var Task2 = class { this.executionsList = task.getExecutionsList(); } }; -var task_default = Task2; +var task_default = Task; // src/index.ts var BaseClient = class { constructor(opts) { this.endpoint = opts.endpoint; - this.rpcClient = new AggregatorClient( + this.rpcClient = new import_avs_grpc_pb.AggregatorClient( this.endpoint, - grpc2.credentials.createInsecure() + grpc.credentials.createInsecure() ); this.metadata = new import_grpc_js.Metadata(); } @@ -4557,31 +5304,37 @@ var BaseClient = class { return false; } } - async authWithAPIKey(apiKey, expiredAtEpoch) { - const request = new GetKeyReq(); - request.setOwner(""); + // When using the APIkey, depends on scope of the key, it may have access to one ore more account + async authWithAPIKey(address2, apiKey, expiredAtEpoch) { + const request = new avs_pb.GetKeyReq(); + request.setOwner(address2); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); const result = await this._callRPC("getKey", request); + this.authKey = result.getKey(); return { authKey: result.getKey() }; } // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address, signature, expiredAtEpoch) { - const request = new GetKeyReq(); - request.setOwner(address); + async authWithSignature(address2, signature, expiredAtEpoch) { + const request = new avs_pb.GetKeyReq(); + request.setOwner(address2); request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); let result = await this._callRPC( "getKey", request ); + console.log("my key is ", result, result.getKey()); + this.authKey = result.getKey(); return { authKey: result.getKey() }; } _callRPC(method, request, options) { const metadata = import_lodash.default.cloneDeep(this.metadata); - if (options?.authKey) { - metadata.set(AUTH_KEY_HEADER, options.authKey); + console.log("my authkey", this.authkey); + if (!this.authKey) { + throw new Error("Not authenticated yet"); } + metadata.set(AUTH_KEY_HEADER, options.authKey); return new Promise((resolve, reject) => { this.rpcClient[method].bind(this.rpcClient)( request, @@ -4593,56 +5346,68 @@ var BaseClient = class { ); }); } + _callAnonRPC(method, request, options) { + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + this.metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } }; var Client = class extends BaseClient { constructor(config) { super(config); } - async getAddresses(address, { authKey }) { - const request = new AddressRequest(); + async listSmartWallets() { + const request = new avs_pb.AddressRequest(); request.setOwner(address); - const result = await this._callRPC("getSmartAccountAddress", request, { authKey }); + const result = await this._callRPC("getSmartAccountAddress", request); return { owner: address, - smart_account_address: result.getSmartAccountAddress() + wallets: result.getWalletsList() }; } async createTask({ - address, + address: address2, oracleContract, tokenContract - }, { authKey }) { - const trigger = new TaskTrigger(); - trigger.setTriggerType(TriggerType.EXPRESSIONTRIGGER); + }) { + const trigger = new avs_pb.TaskTrigger(); + trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); trigger.setExpression( - new ExpressionCondition().setExpression(` + new avs_pb.ExpressionCondition().setExpression(` bigCmp( priceChainlink("${oracleContract}"), toBigInt("10000") ) > 0`) ); - const action = new TaskAction(); - action.setTaskType(TaskType.CONTRACTEXECUTIONTASK); + const action = new avs_pb.TaskAction(); + action.setTaskType(avs_pb.TaskType.CONTRACTEXECUTIONTASK); action.setId("transfer_erc20_1"); action.setName("Transfer Test Token"); - const execution = new ContractExecution(); + const execution = new avs_pb.ContractExecution(); execution.setContractAddress(tokenContract); let ABI = ["function transfer(address to, uint amount)"]; let iface = new import_ethers.ethers.Interface(ABI); const callData = iface.encodeFunctionData("transfer", [ - address, + address2, import_ethers.ethers.parseUnits("12", 18) ]); execution.setCallData(callData); action.setContractExecution(execution); - const request = new CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); + const request = new avs_pb.CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); const result = await this._callRPC("createTask", request, { authKey }); return { id: result.getId() }; } - async listTasks(address, { authKey }) { - const request = new ListTasksReq(); + async listTasks(address2) { + const request = new avs_pb.ListTasksReq(); const result = await this._callRPC("listTasks", request, { authKey }); const tasks = import_lodash.default.map( result.getTasksList(), @@ -4659,36 +5424,33 @@ var Client = class extends BaseClient { } // TODO: specify the return type to match client’s requirements // Right now we simply return the original object from the server - async getTask(id, { authKey }) { - const request = new UUID(); + async getTask(id) { + const request = new avs_pb.UUID(); request.setBytes(id); ``; const result = await this._callRPC( "getTask", - request, - { authKey } + request ); return new task_default(result); } - async cancelTask(id, { authKey }) { - const request = new UUID(); + async cancelTask(id) { + const request = new avs_pb.UUID(); request.setBytes(id); const result = await this._callRPC( "cancelTask", - request, - { authKey } + request ); return { value: result.getValue() }; } - async deleteTask(id, { authKey }) { - const request = new UUID(); + async deleteTask(id) { + const request = new avs_pb.UUID(); request.setBytes(id); const result = await this._callRPC( "deleteTask", - request, - { authKey } + request ); return { value: result.getValue() diff --git a/dist/index.mjs b/dist/index.mjs index 328fea8..8c84996 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1,6 +1,8 @@ +var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] @@ -8,12 +10,8 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { @@ -23,38 +21,22 @@ var __copyProps = (to, from, except, desc) => { } return to; }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); // grpc_codegen/avs_pb.js -var avs_pb_exports = {}; -__export(avs_pb_exports, { - ActionType: () => ActionType, - AddressRequest: () => AddressRequest, - AddressResp: () => AddressResp, - ContractExecution: () => ContractExecution, - CreateTaskReq: () => CreateTaskReq, - CreateTaskResp: () => CreateTaskResp, - ExpressionCondition: () => ExpressionCondition, - GetKeyReq: () => GetKeyReq, - KeyResp: () => KeyResp, - ListTasksReq: () => ListTasksReq, - ListTasksResp: () => ListTasksResp, - Task: () => Task, - TaskAction: () => TaskAction, - TaskTrigger: () => TaskTrigger, - TaskType: () => TaskType, - TriggerType: () => TriggerType, - UUID: () => UUID, - UpdateChecksReq: () => UpdateChecksReq, - UpdateChecksResp: () => UpdateChecksResp -}); -var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest, ListTasksReq, ListTasksResp, TaskTrigger, TriggerType, ExpressionCondition, TaskAction, ActionType, ContractExecution, TaskType, UUID; -var init_avs_pb = __esm({ - "grpc_codegen/avs_pb.js"() { +var require_avs_pb = __commonJS({ + "grpc_codegen/avs_pb.js"(exports) { "use strict"; - jspb = __require("google-protobuf"); - goog = jspb; - global = function() { + var jspb = __require("google-protobuf"); + var goog = jspb; + var global = function() { if (this) { return this; } @@ -69,43 +51,52 @@ var init_avs_pb = __esm({ } return Function("return this")(); }.call(null); - google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); goog.object.extend(proto, google_protobuf_timestamp_pb); - google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); + var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); goog.object.extend(proto, google_protobuf_wrappers_pb); goog.exportSymbol("proto.aggregator.AddressRequest", null, global); goog.exportSymbol("proto.aggregator.AddressResp", null, global); - goog.exportSymbol("proto.aggregator.BranchAction", null, global); + goog.exportSymbol("proto.aggregator.BlockCondition", null, global); + goog.exportSymbol("proto.aggregator.BranchNode", null, global); goog.exportSymbol("proto.aggregator.Checkin", null, global); goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); goog.exportSymbol("proto.aggregator.CheckinResp", null, global); goog.exportSymbol("proto.aggregator.ConditionJump", null, global); - goog.exportSymbol("proto.aggregator.ContractExecution", null, global); - goog.exportSymbol("proto.aggregator.ContractQueryCondition", null, global); + goog.exportSymbol("proto.aggregator.ContractQueryNode", null, global); + goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); - goog.exportSymbol("proto.aggregator.CustomCode", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletReq", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletResp", null, global); + goog.exportSymbol("proto.aggregator.CronCondition", null, global); + goog.exportSymbol("proto.aggregator.CustomCodeNode", null, global); goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); - goog.exportSymbol("proto.aggregator.ETHTransfer", null, global); + goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global); + goog.exportSymbol("proto.aggregator.Error", null, global); + goog.exportSymbol("proto.aggregator.EventCondition", null, global); goog.exportSymbol("proto.aggregator.Execution", null, global); - goog.exportSymbol("proto.aggregator.ExpressionCondition", null, global); + goog.exportSymbol("proto.aggregator.FilterNode", null, global); + goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); - goog.exportSymbol("proto.aggregator.GraphQLDataQuery", null, global); - goog.exportSymbol("proto.aggregator.HTTPAPICall", null, global); + goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); goog.exportSymbol("proto.aggregator.KeyResp", null, global); goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp.TaskItemResp", null, global); goog.exportSymbol("proto.aggregator.NonceRequest", null, global); goog.exportSymbol("proto.aggregator.NonceResp", null, global); + goog.exportSymbol("proto.aggregator.RestAPINode", null, global); + goog.exportSymbol("proto.aggregator.SmartWallet", null, global); goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); goog.exportSymbol("proto.aggregator.Task", null, global); - goog.exportSymbol("proto.aggregator.TaskAction", null, global); + goog.exportSymbol("proto.aggregator.TaskEdge", null, global); + goog.exportSymbol("proto.aggregator.TaskNode", null, global); + goog.exportSymbol("proto.aggregator.TaskNode.TaskBodyCase", null, global); goog.exportSymbol("proto.aggregator.TaskStatus", null, global); goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerConditionCase", null, global); goog.exportSymbol("proto.aggregator.TaskType", null, global); - goog.exportSymbol("proto.aggregator.TimeCondition", null, global); goog.exportSymbol("proto.aggregator.TriggerType", null, global); goog.exportSymbol("proto.aggregator.UUID", null, global); goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); @@ -145,40 +136,40 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; } - proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + proto.aggregator.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); }; - goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); + goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; } - proto.aggregator.TimeCondition = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TimeCondition.repeatedFields_, - null - ); + proto.aggregator.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); }; - goog.inherits(proto.aggregator.TimeCondition, jspb.Message); + goog.inherits(proto.aggregator.CronCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; + proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; } - proto.aggregator.ContractQueryCondition = function(opt_data) { + proto.aggregator.BlockCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); + goog.inherits(proto.aggregator.BlockCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractQueryCondition.displayName = "proto.aggregator.ContractQueryCondition"; + proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; } - proto.aggregator.ExpressionCondition = function(opt_data) { + proto.aggregator.EventCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); + goog.inherits(proto.aggregator.EventCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; + } + proto.aggregator.TaskTrigger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ExpressionCondition.displayName = "proto.aggregator.ExpressionCondition"; + proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; } proto.aggregator.SyncTasksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -187,40 +178,47 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; } - proto.aggregator.ETHTransfer = function(opt_data) { + proto.aggregator.ETHTransferNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; + } + proto.aggregator.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); + goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; + proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; } - proto.aggregator.ContractExecution = function(opt_data) { + proto.aggregator.ContractQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractExecution, jspb.Message); + goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractExecution.displayName = "proto.aggregator.ContractExecution"; + proto.aggregator.ContractQueryNode.displayName = "proto.aggregator.ContractQueryNode"; } - proto.aggregator.GraphQLDataQuery = function(opt_data) { + proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); + goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLDataQuery.displayName = "proto.aggregator.GraphQLDataQuery"; + proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; } - proto.aggregator.HTTPAPICall = function(opt_data) { + proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); + goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; + proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; } - proto.aggregator.CustomCode = function(opt_data) { + proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.CustomCode, jspb.Message); + goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; + proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; } proto.aggregator.ConditionJump = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -229,33 +227,33 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; } - proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.BranchAction.repeatedFields_, - null - ); + proto.aggregator.BranchNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); }; - goog.inherits(proto.aggregator.BranchAction, jspb.Message); + goog.inherits(proto.aggregator.BranchNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; + proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; } - proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TaskAction.repeatedFields_, - null - ); + proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.FilterNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; + } + proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.TaskAction, jspb.Message); + goog.inherits(proto.aggregator.TaskEdge, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; + proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; + } + proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; } proto.aggregator.Execution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -265,28 +263,14 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; } proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.Task.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); }; goog.inherits(proto.aggregator.Task, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.Task.displayName = "proto.aggregator.Task"; } proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.CreateTaskReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -320,9 +304,16 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; } - proto.aggregator.AddressResp = function(opt_data) { + proto.aggregator.SmartWallet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; + goog.inherits(proto.aggregator.SmartWallet, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; + } + proto.aggregator.AddressResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); + }; goog.inherits(proto.aggregator.AddressResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; @@ -335,26 +326,12 @@ var init_avs_pb = __esm({ proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; } proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.ListTasksResp.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); }; goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; } - proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.TaskItemResp.displayName = "proto.aggregator.ListTasksResp.TaskItemResp"; - } proto.aggregator.GetKeyReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; @@ -370,14 +347,7 @@ var init_avs_pb = __esm({ proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; } proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.UpdateChecksReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -390,6 +360,20 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; } + proto.aggregator.CreateWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; + } + proto.aggregator.CreateWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; + } if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.UUID.toObject(opt_includeInstance, this); @@ -439,7 +423,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getBytes(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.UUID.prototype.getBytes = function() { @@ -506,10 +493,7 @@ var init_avs_pb = __esm({ break; case 4: var value = new proto.aggregator.Checkin.Status(); - reader.readMessage( - value, - proto.aggregator.Checkin.Status.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); msg.setStatus(value); break; case 5: @@ -549,15 +533,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getStatus(); if (f != null) { @@ -569,15 +562,24 @@ var init_avs_pb = __esm({ } f = message.getVersion(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 5, + f + ); } f = message.getMetricsport(); if (f !== 0) { - writer.writeInt32(6, f); + writer.writeInt32( + 6, + f + ); } f = message.getRemoteip(); if (f.length > 0) { - writer.writeString(7, f); + writer.writeString( + 7, + f + ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -599,10 +601,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -627,10 +626,7 @@ var init_avs_pb = __esm({ break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastHeartbeat(value); break; default: @@ -649,11 +645,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getUptime(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getQueuedepth(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getLastHeartbeat(); if (f != null) { @@ -685,11 +687,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 3 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) ); }; proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { @@ -798,10 +796,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: @@ -830,11 +825,7 @@ var init_avs_pb = __esm({ proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) ); }; proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { @@ -919,19 +910,31 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getMonotonicClock(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); } }; proto.aggregator.SyncTasksReq.prototype.getId = function() { @@ -970,16 +973,14 @@ var init_avs_pb = __esm({ proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; + proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); + proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { var f, obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - schedule: (f = msg.getSchedule()) && proto.aggregator.TimeCondition.toObject(includeInstance, f), - contractQuery: (f = msg.getContractQuery()) && proto.aggregator.ContractQueryCondition.toObject(includeInstance, f), - expression: (f = msg.getExpression()) && proto.aggregator.ExpressionCondition.toObject(includeInstance, f) + epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -987,12 +988,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { + proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.FixedEpochCondition(); + return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1000,35 +1001,13 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = ( - /** @type {!proto.aggregator.TriggerType} */ - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: - var value = new proto.aggregator.TimeCondition(); - reader.readMessage( - value, - proto.aggregator.TimeCondition.deserializeBinaryFromReader - ); - msg.setSchedule(value); - break; - case 3: - var value = new proto.aggregator.ContractQueryCondition(); - reader.readMessage( - value, - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader - ); - msg.setContractQuery(value); - break; - case 4: - var value = new proto.aggregator.ExpressionCondition(); - reader.readMessage( - value, - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader + var values = ( + /** @type {!Array} */ + reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] ); - msg.setExpression(value); + for (var i = 0; i < values.length; i++) { + msg.addEpoches(values[i]); + } break; default: reader.skipField(); @@ -1037,109 +1016,44 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum(1, f); - } - f = message.getSchedule(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.TimeCondition.serializeBinaryToWriter - ); - } - f = message.getContractQuery(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter - ); - } - f = message.getExpression(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.ExpressionCondition.serializeBinaryToWriter + f = message.getEpochesList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f ); } }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return ( - /** @type{?proto.aggregator.TimeCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); - }; - proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return ( - /** @type{?proto.aggregator.ContractQueryCondition} */ - jspb.Message.getWrapperField( - this, - proto.aggregator.ContractQueryCondition, - 3 - ) - ); - }; - proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getExpression = function() { + proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { return ( - /** @type{?proto.aggregator.ExpressionCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(void 0); + proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; + proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { + return this.setEpochesList([]); }; - proto.aggregator.TimeCondition.repeatedFields_ = [1]; + proto.aggregator.CronCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); + proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { + proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") + cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1147,15 +1061,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TimeCondition.deserializeBinary = function(bytes) { + proto.aggregator.CronCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TimeCondition(); - return proto.aggregator.TimeCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.CronCondition(); + return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1163,20 +1074,11 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var values = ( - /** @type {!Array} */ - reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] - ); - for (var i = 0; i < values.length; i++) { - msg.addFixed(values[i]); - } - break; - case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setCron(value); + msg.addCronTable(value); break; default: reader.skipField(); @@ -1185,57 +1087,43 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TimeCondition.prototype.serializeBinary = function() { + proto.aggregator.CronCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64(1, f); - } - f = message.getCron(); + f = message.getCronTableList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedString( + 1, + f + ); } }; - proto.aggregator.TimeCondition.prototype.getFixedList = function() { + proto.aggregator.CronCondition.prototype.getCronTableList = function() { return ( - /** @type {!Array} */ + /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { + proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.TimeCondition.prototype.addFixed = function(value, opt_index) { + proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); - }; - proto.aggregator.TimeCondition.prototype.getCron = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + proto.aggregator.CronCondition.prototype.clearCronTableList = function() { + return this.setCronTableList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryCondition.toObject( - opt_includeInstance, - this - ); + proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractQueryCondition.toObject = function(includeInstance, msg) { + proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, "") + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1243,15 +1131,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) { + proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryCondition(); - return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.BlockCondition(); + return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1260,17 +1145,10 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() + /** @type {number} */ + reader.readInt64() ); - msg.setCallmsg(value); + msg.setInterval(value); break; default: reader.skipField(); @@ -1279,51 +1157,35 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() { + proto.aggregator.BlockCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter( - this, - writer - ); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); } }; - proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { + proto.aggregator.BlockCondition.prototype.getInterval = function() { return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ExpressionCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ExpressionCondition.toObject( - opt_includeInstance, - this - ); + proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { + proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { var f, obj = { expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -1333,15 +1195,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) { + proto.aggregator.EventCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ExpressionCondition(); - return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.EventCondition(); + return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1362,36 +1221,57 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ExpressionCondition.prototype.serializeBinary = function() { + proto.aggregator.EventCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; - proto.aggregator.ExpressionCondition.prototype.getExpression = function() { + proto.aggregator.EventCondition.prototype.getExpression = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { + proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]]; + proto.aggregator.TaskTrigger.TriggerConditionCase = { + TRIGGER_CONDITION_NOT_SET: 0, + MANUAL: 2, + AT: 3, + CRON: 4, + BLOCK: 5, + EVENT: 6 + }; + proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { + return ( + /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) + ); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); }; - proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1399,15 +1279,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.TaskTrigger(); + return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1416,24 +1293,229 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() + /** @type {!proto.aggregator.TriggerType} */ + reader.readEnum() ); - msg.setId(value); + msg.setTriggerType(value); break; case 2: var value = ( - /** @type {string} */ + /** @type {boolean} */ + reader.readBool() + ); + msg.setManual(value); + break; + case 3: + var value = new proto.aggregator.FixedEpochCondition(); + reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setAt(value); + break; + case 4: + var value = new proto.aggregator.CronCondition(); + reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 5: + var value = new proto.aggregator.BlockCondition(); + reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 6: + var value = new proto.aggregator.EventCondition(); + reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTriggerType(); + if (f !== 0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ + jspb.Message.getField(message, 2); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = message.getAt(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { + return ( + /** @type {!proto.aggregator.TriggerType} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); + }; + proto.aggregator.TaskTrigger.prototype.getManual = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 2, false) + ); + }; + proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 2) != null; + }; + proto.aggregator.TaskTrigger.prototype.getAt = function() { + return ( + /** @type{?proto.aggregator.FixedEpochCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3) + ); + }; + proto.aggregator.TaskTrigger.prototype.setAt = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearAt = function() { + return this.setAt(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasAt = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.TaskTrigger.prototype.getCron = function() { + return ( + /** @type{?proto.aggregator.CronCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4) + ); + }; + proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return ( + /** @type{?proto.aggregator.BlockCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5) + ); + }; + proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 5) != null; + }; + proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return ( + /** @type{?proto.aggregator.EventCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6) + ); + }; + proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 6) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksResp(); + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ reader.readString() ); msg.setChecktype(value); break; case 3: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); break; default: @@ -1452,11 +1534,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getChecktype(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getTrigger(); if (f != null) { @@ -1501,10 +1589,10 @@ var init_avs_pb = __esm({ return jspb.Message.getField(this, 3) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); + proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { + proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { destination: jspb.Message.getFieldWithDefault(msg, 1, ""), amount: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1515,12 +1603,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { + proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer(); - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ETHTransferNode(); + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1548,53 +1636,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { + proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getDestination(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAmount(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.ETHTransfer.prototype.getDestination = function() { + proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { + proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ETHTransfer.prototype.getAmount = function() { + proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { + proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) { + proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { var f, obj = { contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - encodedParams: jspb.Message.getFieldWithDefault(msg, 4, "") + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1602,15 +1692,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { + proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractExecution(); - return proto.aggregator.ContractExecution.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ContractWriteNode(); + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1636,14 +1723,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setMethod(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setEncodedParams(value); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -1652,74 +1732,179 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ContractExecution.prototype.serializeBinary = function() { + proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getCallData(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getEncodedParams(); + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(4, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.ContractExecution.prototype.getContractAddress = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ContractExecution.prototype.getCallData = function() { + proto.aggregator.ContractWriteNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ContractExecution.prototype.setCallData = function(value) { + proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.ContractExecution.prototype.getMethod = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.ContractExecution.prototype.setMethod = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ContractQueryNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ContractQueryNode(); + return proto.aggregator.ContractQueryNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ContractQueryNode.prototype.getCallData = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject( - opt_includeInstance, - this - ); + proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; - proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { + proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), query: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1730,15 +1915,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { + proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLDataQuery(); - return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.GraphQLQueryNode(); + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1766,49 +1948,56 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { + proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getQuery(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { + proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { + proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { + proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { + proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); + proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; - proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { + proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, "") + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1816,12 +2005,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { + proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.HTTPAPICall(); - return proto.aggregator.HTTPAPICall.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.RestAPINode(); + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1838,15 +2027,7 @@ var init_avs_pb = __esm({ case 2: var value = msg.getHeadersMap(); reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary( - message, - reader2, - jspb.BinaryReader.prototype.readString, - jspb.BinaryReader.prototype.readString, - null, - "", - "" - ); + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 3: @@ -1856,6 +2037,13 @@ var init_avs_pb = __esm({ ); msg.setBody(value); break; + case 4: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMethod(value); + break; default: reader.skipField(); break; @@ -1863,67 +2051,89 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { + proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getHeadersMap(true); if (f && f.getLength() > 0) { - f.serializeBinary( - 2, - writer, - jspb.BinaryWriter.prototype.writeString, - jspb.BinaryWriter.prototype.writeString - ); + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getBody(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); } }; - proto.aggregator.HTTPAPICall.prototype.getUrl = function() { + proto.aggregator.RestAPINode.prototype.getUrl = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { + proto.aggregator.RestAPINode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { + proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { return ( /** @type {!jspb.Map} */ - jspb.Message.getMapField(this, 2, opt_noLazyCreate, null) + jspb.Message.getMapField( + this, + 2, + opt_noLazyCreate, + null + ) ); }; - proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { + proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { this.getHeadersMap().clear(); return this; }; - proto.aggregator.HTTPAPICall.prototype.getBody = function() { + proto.aggregator.RestAPINode.prototype.getBody = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { + proto.aggregator.RestAPINode.prototype.setBody = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + proto.aggregator.RestAPINode.prototype.getMethod = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); + proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; - proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { + proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1931,12 +2141,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.CustomCode.deserializeBinary = function(bytes) { + proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCode(); - return proto.aggregator.CustomCode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CustomCodeNode(); + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1955,7 +2165,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setBody(value); + msg.setSource(value); break; default: reader.skipField(); @@ -1964,38 +2174,44 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.CustomCode.prototype.serializeBinary = function() { + proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getType(); if (f !== 0) { - writer.writeEnum(1, f); + writer.writeEnum( + 1, + f + ); } - f = message.getBody(); + f = message.getSource(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.CustomCode.prototype.getType = function() { + proto.aggregator.CustomCodeNode.prototype.getType = function() { return ( /** @type {!proto.aggregator.CustomCodeType} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.CustomCode.prototype.setType = function(value) { + proto.aggregator.CustomCodeNode.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; - proto.aggregator.CustomCode.prototype.getBody = function() { + proto.aggregator.CustomCodeNode.prototype.getSource = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.CustomCode.prototype.setBody = function(value) { + proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2016,10 +2232,7 @@ var init_avs_pb = __esm({ proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -2058,11 +2271,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getNext(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; proto.aggregator.ConditionJump.prototype.getExpression = function() { @@ -2083,12 +2302,12 @@ var init_avs_pb = __esm({ proto.aggregator.ConditionJump.prototype.setNext = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchAction.repeatedFields_ = [2]; + proto.aggregator.BranchNode.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); + proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; - proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { + proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), elseifsList: jspb.Message.toObjectList( @@ -2104,12 +2323,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.BranchAction.deserializeBinary = function(bytes) { + proto.aggregator.BranchNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.BranchNode(); + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2118,26 +2337,17 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); msg.setIf(value); break; case 2: var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); msg.addElseifs(value); break; case 3: var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); msg.setElse(value); break; default: @@ -2147,12 +2357,12 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.BranchAction.prototype.serializeBinary = function() { + proto.aggregator.BranchNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getIf(); if (f != null) { @@ -2179,78 +2389,262 @@ var init_avs_pb = __esm({ ); } }; - proto.aggregator.BranchAction.prototype.getIf = function() { + proto.aggregator.BranchNode.prototype.getIf = function() { return ( /** @type{?proto.aggregator.ConditionJump} */ jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) ); }; - proto.aggregator.BranchAction.prototype.setIf = function(value) { + proto.aggregator.BranchNode.prototype.setIf = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; - proto.aggregator.BranchAction.prototype.clearIf = function() { + proto.aggregator.BranchNode.prototype.clearIf = function() { return this.setIf(void 0); }; - proto.aggregator.BranchAction.prototype.hasIf = function() { + proto.aggregator.BranchNode.prototype.hasIf = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.BranchAction.prototype.getElseifsList = function() { + proto.aggregator.BranchNode.prototype.getElseifsList = function() { return ( /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ConditionJump, - 2 - ) + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2) ); }; - proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { + proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; - proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.ConditionJump, - opt_index - ); + proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); }; - proto.aggregator.BranchAction.prototype.clearElseifsList = function() { + proto.aggregator.BranchNode.prototype.clearElseifsList = function() { return this.setElseifsList([]); }; - proto.aggregator.BranchAction.prototype.getElse = function() { + proto.aggregator.BranchNode.prototype.getElse = function() { return ( /** @type{?proto.aggregator.ConditionJump} */ jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) ); }; - proto.aggregator.BranchAction.prototype.setElse = function(value) { + proto.aggregator.BranchNode.prototype.setElse = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; - proto.aggregator.BranchAction.prototype.clearElse = function() { + proto.aggregator.BranchNode.prototype.clearElse = function() { return this.setElse(void 0); }; - proto.aggregator.BranchAction.prototype.hasElse = function() { + proto.aggregator.BranchNode.prototype.hasElse = function() { return jspb.Message.getField(this, 3) != null; }; - proto.aggregator.TaskAction.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); + proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode(); + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.FilterNode.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge(); + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.TaskEdge.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TaskEdge.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.TaskEdge.prototype.getTarget = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17]]; + proto.aggregator.TaskNode.TaskBodyCase = { + TASK_BODY_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + CUSTOM_CODE: 17 + }; + proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { + return ( + /** @type {proto.aggregator.TaskNode.TaskBodyCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) + ); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); }; - proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { + proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { var f, obj = { - taskType: jspb.Message.getFieldWithDefault(msg, 1, 0), + nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 3, ""), - nextList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? void 0 : f, - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: (f = msg.getContractExecution()) && proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: (f = msg.getHttpDataQuery()) && proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchAction.toObject(includeInstance, f) + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractQueryNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2258,12 +2652,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TaskAction.deserializeBinary = function(bytes) { + proto.aggregator.TaskNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskNode(); + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2275,7 +2669,7 @@ var init_avs_pb = __esm({ /** @type {!proto.aggregator.TaskType} */ reader.readEnum() ); - msg.setTaskType(value); + msg.setNodeType(value); break; case 2: var value = ( @@ -2291,61 +2685,46 @@ var init_avs_pb = __esm({ ); msg.setName(value); break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addNext(value); - break; case 10: - var value = new proto.aggregator.ETHTransfer(); - reader.readMessage( - value, - proto.aggregator.ETHTransfer.deserializeBinaryFromReader - ); + var value = new proto.aggregator.ETHTransferNode(); + reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); msg.setEthTransfer(value); break; case 11: - var value = new proto.aggregator.ContractExecution(); - reader.readMessage( - value, - proto.aggregator.ContractExecution.deserializeBinaryFromReader - ); - msg.setContractExecution(value); + var value = new proto.aggregator.ContractWriteNode(); + reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.GraphQLDataQuery(); - reader.readMessage( - value, - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader - ); - msg.setGraphqlDataQuery(value); + var value = new proto.aggregator.ContractQueryNode(); + reader.readMessage(value, proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + msg.setContractRead(value); break; case 13: - var value = new proto.aggregator.HTTPAPICall(); - reader.readMessage( - value, - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader - ); - msg.setHttpDataQuery(value); + var value = new proto.aggregator.GraphQLQueryNode(); + reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); break; case 14: - var value = new proto.aggregator.CustomCode(); - reader.readMessage( - value, - proto.aggregator.CustomCode.deserializeBinaryFromReader - ); - msg.setCustomCode(value); + var value = new proto.aggregator.RestAPINode(); + reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); break; case 15: - var value = new proto.aggregator.BranchAction(); - reader.readMessage( - value, - proto.aggregator.BranchAction.deserializeBinaryFromReader - ); + var value = new proto.aggregator.BranchNode(); + reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); msg.setBranch(value); break; + case 16: + var value = new proto.aggregator.FilterNode(); + reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.CustomCodeNode(); + reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; default: reader.skipField(); break; @@ -2353,67 +2732,72 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TaskAction.prototype.serializeBinary = function() { + proto.aggregator.TaskNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTaskType(); + f = message.getNodeType(); if (f !== 0) { - writer.writeEnum(1, f); + writer.writeEnum( + 1, + f + ); } f = message.getId(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getName(); if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString(4, f); + writer.writeString( + 3, + f + ); } f = message.getEthTransfer(); if (f != null) { writer.writeMessage( 10, f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + proto.aggregator.ETHTransferNode.serializeBinaryToWriter ); } - f = message.getContractExecution(); + f = message.getContractWrite(); if (f != null) { writer.writeMessage( 11, f, - proto.aggregator.ContractExecution.serializeBinaryToWriter + proto.aggregator.ContractWriteNode.serializeBinaryToWriter ); } - f = message.getGraphqlDataQuery(); + f = message.getContractRead(); if (f != null) { writer.writeMessage( 12, f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter + proto.aggregator.ContractQueryNode.serializeBinaryToWriter ); } - f = message.getHttpDataQuery(); + f = message.getGraphqlDataQuery(); if (f != null) { writer.writeMessage( 13, f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getRestApi(); if (f != null) { writer.writeMessage( 14, f, - proto.aggregator.CustomCode.serializeBinaryToWriter + proto.aggregator.RestAPINode.serializeBinaryToWriter ); } f = message.getBranch(); @@ -2421,142 +2805,173 @@ var init_avs_pb = __esm({ writer.writeMessage( 15, f, - proto.aggregator.BranchAction.serializeBinaryToWriter + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter ); } }; - proto.aggregator.TaskAction.prototype.getTaskType = function() { + proto.aggregator.TaskNode.prototype.getNodeType = function() { return ( /** @type {!proto.aggregator.TaskType} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.TaskAction.prototype.setTaskType = function(value) { + proto.aggregator.TaskNode.prototype.setNodeType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; - proto.aggregator.TaskAction.prototype.getId = function() { + proto.aggregator.TaskNode.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.TaskAction.prototype.setId = function(value) { + proto.aggregator.TaskNode.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.TaskAction.prototype.getName = function() { + proto.aggregator.TaskNode.prototype.getName = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.TaskAction.prototype.setName = function(value) { + proto.aggregator.TaskNode.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.TaskAction.prototype.getNextList = function() { + proto.aggregator.TaskNode.prototype.getEthTransfer = function() { return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 4) - ); - }; - proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); - }; - proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); - }; - proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); - }; - proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransfer} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) + /** @type{?proto.aggregator.ETHTransferNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) ); }; - proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { + proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { return this.setEthTransfer(void 0); }; - proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { + proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { return jspb.Message.getField(this, 10) != null; }; - proto.aggregator.TaskAction.prototype.getContractExecution = function() { + proto.aggregator.TaskNode.prototype.getContractWrite = function() { return ( - /** @type{?proto.aggregator.ContractExecution} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) + /** @type{?proto.aggregator.ContractWriteNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) ); }; - proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); + proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(void 0); + proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(void 0); }; - proto.aggregator.TaskAction.prototype.hasContractExecution = function() { + proto.aggregator.TaskNode.prototype.hasContractWrite = function() { return jspb.Message.getField(this, 11) != null; }; - proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.getContractRead = function() { return ( - /** @type{?proto.aggregator.GraphQLDataQuery} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) + /** @type{?proto.aggregator.ContractQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12) ); }; - proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); + proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(void 0); }; - proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasContractRead = function() { return jspb.Message.getField(this, 12) != null; }; - proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { return ( - /** @type{?proto.aggregator.HTTPAPICall} */ - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) + /** @type{?proto.aggregator.GraphQLQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) ); }; - proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); + proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(void 0); }; - proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { return jspb.Message.getField(this, 13) != null; }; - proto.aggregator.TaskAction.prototype.getCustomCode = function() { + proto.aggregator.TaskNode.prototype.getRestApi = function() { return ( - /** @type{?proto.aggregator.CustomCode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) + /** @type{?proto.aggregator.RestAPINode} */ + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) ); }; - proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); + proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(void 0); }; - proto.aggregator.TaskAction.prototype.hasCustomCode = function() { + proto.aggregator.TaskNode.prototype.hasRestApi = function() { return jspb.Message.getField(this, 14) != null; }; - proto.aggregator.TaskAction.prototype.getBranch = function() { + proto.aggregator.TaskNode.prototype.getBranch = function() { return ( - /** @type{?proto.aggregator.BranchAction} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) + /** @type{?proto.aggregator.BranchNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) ); }; - proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); + proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearBranch = function() { + proto.aggregator.TaskNode.prototype.clearBranch = function() { return this.setBranch(void 0); }; - proto.aggregator.TaskAction.prototype.hasBranch = function() { + proto.aggregator.TaskNode.prototype.hasBranch = function() { return jspb.Message.getField(this, 15) != null; }; + proto.aggregator.TaskNode.prototype.getFilter = function() { + return ( + /** @type{?proto.aggregator.FilterNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) + ); + }; + proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(void 0); + }; + proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; + }; + proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return ( + /** @type{?proto.aggregator.CustomCodeNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(void 0); + }; + proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 17) != null; + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Execution.toObject(opt_includeInstance, this); @@ -2622,15 +3037,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getEpoch(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getUserOpHash(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getError(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.Execution.prototype.getEpoch = function() { @@ -2660,7 +3084,7 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.prototype.setError = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.Task.repeatedFields_ = [5, 12]; + proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Task.toObject(opt_includeInstance, this); @@ -2669,19 +3093,24 @@ var init_avs_pb = __esm({ var f, obj = { id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), + memo: jspb.Message.getFieldWithDefault(msg, 7, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + status: jspb.Message.getFieldWithDefault(msg, 9, 0), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), nodesList: jspb.Message.toObjectList( msg.getNodesList(), - proto.aggregator.TaskAction.toObject, + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance ), - startAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 9, 0), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), executionsList: jspb.Message.toObjectList( msg.getExecutionsList(), proto.aggregator.Execution.toObject, @@ -2708,10 +3137,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.UUID(); - reader.readMessage( - value, - proto.aggregator.UUID.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.UUID.deserializeBinaryFromReader); msg.setId(value); break; case 2: @@ -2726,46 +3152,30 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); - break; - case 4: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); - msg.setTrigger(value); + msg.setSmartWalletAddress(value); break; case 5: - var value = new proto.aggregator.TaskAction(); - reader.readMessage( - value, - proto.aggregator.TaskAction.deserializeBinaryFromReader - ); - msg.addNodes(value); - break; - case 6: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 7: + case 6: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; - case 8: + case 7: var value = ( /** @type {string} */ reader.readString() ); msg.setMemo(value); break; - case 9: + case 8: var value = ( /** @type {number} */ reader.readInt64() @@ -2773,25 +3183,37 @@ var init_avs_pb = __esm({ msg.setCompletedAt(value); break; case 10: + var value = ( + /** @type {boolean} */ + reader.readBool() + ); + msg.setRecurring(value); + break; + case 9: var value = ( /** @type {!proto.aggregator.TaskStatus} */ reader.readEnum() ); msg.setStatus(value); break; + case 4: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; case 11: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); break; case 12: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: var value = new proto.aggregator.Execution(); - reader.readMessage( - value, - proto.aggregator.Execution.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); msg.addExecutions(value); break; default: @@ -2810,61 +3232,97 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f != null) { - writer.writeMessage(1, f, proto.aggregator.UUID.serializeBinaryToWriter); + writer.writeMessage( + 1, + f, + proto.aggregator.UUID.serializeBinaryToWriter + ); } f = message.getOwner(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + writer.writeString( + 2, + f ); } - f = message.getNodesList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 3, + f ); } f = message.getStartAt(); if (f !== 0) { - writer.writeInt64(6, f); + writer.writeInt64( + 5, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(7, f); + writer.writeInt64( + 6, + f + ); } f = message.getMemo(); if (f.length > 0) { - writer.writeString(8, f); + writer.writeString( + 7, + f + ); } f = message.getCompletedAt(); if (f !== 0) { - writer.writeInt64(9, f); + writer.writeInt64( + 8, + f + ); + } + f = message.getRecurring(); + if (f) { + writer.writeBool( + 10, + f + ); } f = message.getStatus(); if (f !== 0) { - writer.writeEnum(10, f); + writer.writeEnum( + 9, + f + ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool(11, f); + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); } - f = message.getExecutionsList(); + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); if (f.length > 0) { writer.writeRepeatedMessage( 12, f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + f = message.getExecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, proto.aggregator.Execution.serializeBinaryToWriter ); } @@ -2893,127 +3351,130 @@ var init_avs_pb = __esm({ proto.aggregator.Task.prototype.setOwner = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.Task.prototype.getSmartAccountAddress = function() { + proto.aggregator.Task.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { + proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); - }; - proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 5, - opt_value, - proto.aggregator.TaskAction, - opt_index - ); - }; - proto.aggregator.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; proto.aggregator.Task.prototype.getStartAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) + jspb.Message.getFieldWithDefault(this, 5, 0) ); }; proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 5, value); }; proto.aggregator.Task.prototype.getExpiredAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) + jspb.Message.getFieldWithDefault(this, 6, 0) ); }; proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); + return jspb.Message.setProto3IntField(this, 6, value); }; proto.aggregator.Task.prototype.getMemo = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 8, "") + jspb.Message.getFieldWithDefault(this, 7, "") ); }; proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 7, value); }; proto.aggregator.Task.prototype.getCompletedAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 9, 0) + jspb.Message.getFieldWithDefault(this, 8, 0) ); }; proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 8, value); + }; + proto.aggregator.Task.prototype.getRecurring = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 10, false) + ); + }; + proto.aggregator.Task.prototype.setRecurring = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); }; proto.aggregator.Task.prototype.getStatus = function() { return ( /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 10, 0) + jspb.Message.getFieldWithDefault(this, 9, 0) ); }; proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); + return jspb.Message.setProto3EnumField(this, 9, value); + }; + proto.aggregator.Task.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) + ); + }; + proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; - proto.aggregator.Task.prototype.getRepeatable = function() { + proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.Task.prototype.getNodesList = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 11, false) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) ); }; - proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); + proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); + }; + proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.Task.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) + ); + }; + proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); + }; + proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; proto.aggregator.Task.prototype.getExecutionsList = function() { return ( /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) ); }; proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 12, - opt_value, - proto.aggregator.Execution, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; proto.aggregator.Task.prototype.clearExecutionsList = function() { return this.setExecutionsList([]); }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; + proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); @@ -3021,15 +3482,21 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { var f, obj = { trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + nodesList: jspb.Message.toObjectList( + msg.getNodesList(), + proto.aggregator.TaskNode.toObject, includeInstance ), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3040,10 +3507,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3054,47 +3518,53 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); break; case 2: - var value = new proto.aggregator.TaskAction(); - reader.readMessage( - value, - proto.aggregator.TaskAction.deserializeBinaryFromReader - ); - msg.addActions(value); - break; - case 3: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 4: + case 3: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; + case 4: + var value = ( + /** @type {boolean} */ + reader.readBool() + ); + msg.setRepeatable(value); + break; case 5: var value = ( /** @type {string} */ reader.readString() ); - msg.setMemo(value); + msg.setSmartWalletAddress(value); break; case 6: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {string} */ + reader.readString() ); - msg.setRepeatable(value); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -3118,29 +3588,56 @@ var init_avs_pb = __esm({ proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getActionsList(); + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getRepeatable(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, + 7, f, - proto.aggregator.TaskAction.serializeBinaryToWriter + proto.aggregator.TaskNode.serializeBinaryToWriter ); } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64(3, f); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64(4, f); - } - f = message.getMemo(); + f = message.getEdgesList(); if (f.length > 0) { - writer.writeString(5, f); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool(6, f); + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); } }; proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { @@ -3158,62 +3655,80 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { + proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.TaskAction, - opt_index + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); + proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 4, false) ); }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); + proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + proto.aggregator.CreateTaskReq.prototype.getMemo = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 6, false) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") ); }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); + proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); + }; + proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); + }; + proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { @@ -3232,10 +3747,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3267,7 +3779,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.CreateTaskResp.prototype.getId = function() { @@ -3328,7 +3843,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceRequest.prototype.getOwner = function() { @@ -3389,7 +3907,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getNonce(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceResp.prototype.getNonce = function() { @@ -3407,7 +3928,8 @@ var init_avs_pb = __esm({ }; proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3418,10 +3940,7 @@ var init_avs_pb = __esm({ proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3435,7 +3954,14 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setOwner(value); + msg.setFactory(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); break; default: reader.skipField(); @@ -3451,28 +3977,48 @@ var init_avs_pb = __esm({ }; proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getOwner(); + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.AddressRequest.prototype.getOwner = function() { + proto.aggregator.AddressRequest.prototype.getFactory = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressRequest.prototype.setOwner = function(value) { + proto.aggregator.AddressRequest.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.AddressRequest.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.AddressRequest.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); + proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3480,12 +4026,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { + proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SmartWallet(); + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3497,14 +4043,21 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); + msg.setAddress(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setNonce(value); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); break; default: reader.skipField(); @@ -3513,64 +4066,98 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { + proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getSmartAccountAddress(); + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 2, + f + ); } - f = message.getNonce(); + f = message.getFactory(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { + proto.aggregator.SmartWallet.prototype.getAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { + proto.aggregator.SmartWallet.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.AddressResp.prototype.getNonce = function() { + proto.aggregator.SmartWallet.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.AddressResp.prototype.setNonce = function(value) { + proto.aggregator.SmartWallet.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.SmartWallet.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.AddressResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); + proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); }; - proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = {}; + proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList( + msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, + includeInstance + ) + }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } - proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { + proto.aggregator.AddressResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.AddressResp(); + return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet(); + reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; default: reader.skipField(); break; @@ -3578,26 +4165,44 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { + proto.aggregator.AddressResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { var f = void 0; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } + }; + proto.aggregator.AddressResp.prototype.getWalletsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) + ); + }; + proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); + }; + proto.aggregator.AddressResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); }; - proto.aggregator.ListTasksResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); + proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); }; - proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { + proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { var f, obj = { - tasksList: jspb.Message.toObjectList( - msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, - includeInstance - ) + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3605,15 +4210,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { + proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ListTasksReq(); + return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3621,12 +4223,11 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage( - value, - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.addTasks(value); + msg.setSmartWalletAddress(value); break; default: reader.skipField(); @@ -3635,33 +4236,42 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { + proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTasksList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter + f ); } }; + proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ListTasksResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); }; - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { + proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) + tasksList: jspb.Message.toObjectList( + msg.getTasksList(), + proto.aggregator.Task.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3669,15 +4279,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { + proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ListTasksResp(); + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3685,18 +4292,9 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); + var value = new proto.aggregator.Task(); + reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); break; default: reader.skipField(); @@ -3705,64 +4303,33 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { + proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum(2, f); - } - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); + proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTasksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); + } }; proto.aggregator.ListTasksResp.prototype.getTasksList = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ListTasksResp.TaskItemResp, - 1 - ) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) ); }; proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.aggregator.ListTasksResp.TaskItemResp, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { return this.setTasksList([]); @@ -3832,15 +4399,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.GetKeyReq.prototype.getOwner = function() { @@ -3919,7 +4495,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getKey(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.KeyResp.prototype.getKey = function() { @@ -3951,10 +4530,7 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -4000,15 +4576,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getIdList(); if (f.length > 0) { - writer.writeRepeatedString(3, f); + writer.writeRepeatedString( + 3, + f + ); } }; proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { @@ -4046,10 +4631,7 @@ var init_avs_pb = __esm({ }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject( - opt_includeInstance, - this - ); + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); }; proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { var f, obj = { @@ -4064,10 +4646,7 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -4078,10 +4657,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: @@ -4110,11 +4686,7 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) ); }; proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { @@ -4126,18 +4698,174 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletReq(); + return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 + proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CreateWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletResp(); + return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TriggerType = { + MANUALTRIGGER: 0, + FIXEDEPOCHTRIGGER: 1, + CRONTRIGGER: 2, + BLOCKTRIGGER: 3, + EVENTTRIGGER: 4 + }; + proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1e3, + STORAGEUNAVAILABLE: 2e3, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6e3, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7e3, + TASKDATAMISSINGERROR: 7001 }; proto.aggregator.TaskStatus = { ACTIVE: 0, @@ -4149,355 +4877,379 @@ var init_avs_pb = __esm({ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; + proto.aggregator.TaskType = { + ETHTRANSFERTASK: 0, + CONTRACTWRITETASK: 1, + CONTRACTREADTASK: 2, + GRAPHQLDATAQUERYTASK: 3, + RESTAPITASK: 4, + BRANCHTASK: 5, + FILTERTASK: 6, + CUSTOMCODETASK: 7 + }; goog.object.extend(exports, proto.aggregator); - ({ - Task, - CreateTaskReq, - CreateTaskResp, - GetKeyReq, - KeyResp, - UpdateChecksReq, - UpdateChecksResp, - AddressResp, - AddressRequest, - ListTasksReq, - ListTasksResp, - TaskTrigger, - TriggerType, - ExpressionCondition, - TaskAction, - ActionType, - ContractExecution, - TaskType, - UUID - } = proto.aggregator); + } +}); + +// grpc_codegen/avs_grpc_pb.js +var require_avs_grpc_pb = __commonJS({ + "grpc_codegen/avs_grpc_pb.js"(exports) { + "use strict"; + var grpc2 = __require("@grpc/grpc-js"); + var avs_pb2 = require_avs_pb(); + var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); + function serialize_aggregator_AddressRequest(arg) { + if (!(arg instanceof avs_pb2.AddressRequest)) { + throw new Error("Expected argument of type aggregator.AddressRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_AddressRequest(buffer_arg) { + return avs_pb2.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_AddressResp(arg) { + if (!(arg instanceof avs_pb2.AddressResp)) { + throw new Error("Expected argument of type aggregator.AddressResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_AddressResp(buffer_arg) { + return avs_pb2.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Checkin(arg) { + if (!(arg instanceof avs_pb2.Checkin)) { + throw new Error("Expected argument of type aggregator.Checkin"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Checkin(buffer_arg) { + return avs_pb2.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CheckinResp(arg) { + if (!(arg instanceof avs_pb2.CheckinResp)) { + throw new Error("Expected argument of type aggregator.CheckinResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CheckinResp(buffer_arg) { + return avs_pb2.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskReq(arg) { + if (!(arg instanceof avs_pb2.CreateTaskReq)) { + throw new Error("Expected argument of type aggregator.CreateTaskReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskReq(buffer_arg) { + return avs_pb2.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskResp(arg) { + if (!(arg instanceof avs_pb2.CreateTaskResp)) { + throw new Error("Expected argument of type aggregator.CreateTaskResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskResp(buffer_arg) { + return avs_pb2.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb2.CreateWalletReq)) { + throw new Error("Expected argument of type aggregator.CreateWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb2.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb2.CreateWalletResp)) { + throw new Error("Expected argument of type aggregator.CreateWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb2.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_GetKeyReq(arg) { + if (!(arg instanceof avs_pb2.GetKeyReq)) { + throw new Error("Expected argument of type aggregator.GetKeyReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_GetKeyReq(buffer_arg) { + return avs_pb2.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_KeyResp(arg) { + if (!(arg instanceof avs_pb2.KeyResp)) { + throw new Error("Expected argument of type aggregator.KeyResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_KeyResp(buffer_arg) { + return avs_pb2.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksReq(arg) { + if (!(arg instanceof avs_pb2.ListTasksReq)) { + throw new Error("Expected argument of type aggregator.ListTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksReq(buffer_arg) { + return avs_pb2.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksResp(arg) { + if (!(arg instanceof avs_pb2.ListTasksResp)) { + throw new Error("Expected argument of type aggregator.ListTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksResp(buffer_arg) { + return avs_pb2.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceRequest(arg) { + if (!(arg instanceof avs_pb2.NonceRequest)) { + throw new Error("Expected argument of type aggregator.NonceRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceRequest(buffer_arg) { + return avs_pb2.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceResp(arg) { + if (!(arg instanceof avs_pb2.NonceResp)) { + throw new Error("Expected argument of type aggregator.NonceResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceResp(buffer_arg) { + return avs_pb2.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksReq(arg) { + if (!(arg instanceof avs_pb2.SyncTasksReq)) { + throw new Error("Expected argument of type aggregator.SyncTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksReq(buffer_arg) { + return avs_pb2.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksResp(arg) { + if (!(arg instanceof avs_pb2.SyncTasksResp)) { + throw new Error("Expected argument of type aggregator.SyncTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksResp(buffer_arg) { + return avs_pb2.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb2.Task)) { + throw new Error("Expected argument of type aggregator.Task"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Task(buffer_arg) { + return avs_pb2.Task.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UUID(arg) { + if (!(arg instanceof avs_pb2.UUID)) { + throw new Error("Expected argument of type aggregator.UUID"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UUID(buffer_arg) { + return avs_pb2.UUID.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksReq(arg) { + if (!(arg instanceof avs_pb2.UpdateChecksReq)) { + throw new Error("Expected argument of type aggregator.UpdateChecksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksReq(buffer_arg) { + return avs_pb2.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksResp(arg) { + if (!(arg instanceof avs_pb2.UpdateChecksResp)) { + throw new Error("Expected argument of type aggregator.UpdateChecksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksResp(buffer_arg) { + return avs_pb2.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_google_protobuf_BoolValue(arg) { + if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { + throw new Error("Expected argument of type google.protobuf.BoolValue"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_google_protobuf_BoolValue(buffer_arg) { + return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); + } + var AggregatorService = exports.AggregatorService = { + // Auth + getKey: { + path: "/aggregator.Aggregator/GetKey", + requestStream: false, + responseStream: false, + requestType: avs_pb2.GetKeyReq, + responseType: avs_pb2.KeyResp, + requestSerialize: serialize_aggregator_GetKeyReq, + requestDeserialize: deserialize_aggregator_GetKeyReq, + responseSerialize: serialize_aggregator_KeyResp, + responseDeserialize: deserialize_aggregator_KeyResp + }, + // Smart Acccount + getNonce: { + path: "/aggregator.Aggregator/GetNonce", + requestStream: false, + responseStream: false, + requestType: avs_pb2.NonceRequest, + responseType: avs_pb2.NonceResp, + requestSerialize: serialize_aggregator_NonceRequest, + requestDeserialize: deserialize_aggregator_NonceRequest, + responseSerialize: serialize_aggregator_NonceResp, + responseDeserialize: deserialize_aggregator_NonceResp + }, + getSmartAccountAddress: { + path: "/aggregator.Aggregator/GetSmartAccountAddress", + requestStream: false, + responseStream: false, + requestType: avs_pb2.AddressRequest, + responseType: avs_pb2.AddressResp, + requestSerialize: serialize_aggregator_AddressRequest, + requestDeserialize: deserialize_aggregator_AddressRequest, + responseSerialize: serialize_aggregator_AddressResp, + responseDeserialize: deserialize_aggregator_AddressResp + }, + // Task Management + createWallet: { + path: "/aggregator.Aggregator/CreateWallet", + requestStream: false, + responseStream: false, + requestType: avs_pb2.CreateWalletReq, + responseType: avs_pb2.CreateWalletResp, + requestSerialize: serialize_aggregator_CreateWalletReq, + requestDeserialize: deserialize_aggregator_CreateWalletReq, + responseSerialize: serialize_aggregator_CreateWalletResp, + responseDeserialize: deserialize_aggregator_CreateWalletResp + }, + createTask: { + path: "/aggregator.Aggregator/CreateTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.CreateTaskReq, + responseType: avs_pb2.CreateTaskResp, + requestSerialize: serialize_aggregator_CreateTaskReq, + requestDeserialize: deserialize_aggregator_CreateTaskReq, + responseSerialize: serialize_aggregator_CreateTaskResp, + responseDeserialize: deserialize_aggregator_CreateTaskResp + }, + listTasks: { + path: "/aggregator.Aggregator/ListTasks", + requestStream: false, + responseStream: false, + requestType: avs_pb2.ListTasksReq, + responseType: avs_pb2.ListTasksResp, + requestSerialize: serialize_aggregator_ListTasksReq, + requestDeserialize: deserialize_aggregator_ListTasksReq, + responseSerialize: serialize_aggregator_ListTasksResp, + responseDeserialize: deserialize_aggregator_ListTasksResp + }, + getTask: { + path: "/aggregator.Aggregator/GetTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UUID, + responseType: avs_pb2.Task, + requestSerialize: serialize_aggregator_UUID, + requestDeserialize: deserialize_aggregator_UUID, + responseSerialize: serialize_aggregator_Task, + responseDeserialize: deserialize_aggregator_Task + }, + cancelTask: { + path: "/aggregator.Aggregator/CancelTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UUID, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_UUID, + requestDeserialize: deserialize_aggregator_UUID, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + deleteTask: { + path: "/aggregator.Aggregator/DeleteTask", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UUID, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_UUID, + requestDeserialize: deserialize_aggregator_UUID, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + // Operator endpoint + ping: { + path: "/aggregator.Aggregator/Ping", + requestStream: false, + responseStream: false, + requestType: avs_pb2.Checkin, + responseType: avs_pb2.CheckinResp, + requestSerialize: serialize_aggregator_Checkin, + requestDeserialize: deserialize_aggregator_Checkin, + responseSerialize: serialize_aggregator_CheckinResp, + responseDeserialize: deserialize_aggregator_CheckinResp + }, + syncTasks: { + path: "/aggregator.Aggregator/SyncTasks", + requestStream: false, + responseStream: true, + requestType: avs_pb2.SyncTasksReq, + responseType: avs_pb2.SyncTasksResp, + requestSerialize: serialize_aggregator_SyncTasksReq, + requestDeserialize: deserialize_aggregator_SyncTasksReq, + responseSerialize: serialize_aggregator_SyncTasksResp, + responseDeserialize: deserialize_aggregator_SyncTasksResp + }, + updateChecks: { + path: "/aggregator.Aggregator/UpdateChecks", + requestStream: false, + responseStream: false, + requestType: avs_pb2.UpdateChecksReq, + responseType: avs_pb2.UpdateChecksResp, + requestSerialize: serialize_aggregator_UpdateChecksReq, + requestDeserialize: deserialize_aggregator_UpdateChecksReq, + responseSerialize: serialize_aggregator_UpdateChecksResp, + responseDeserialize: deserialize_aggregator_UpdateChecksResp + } + }; + exports.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); } }); // src/index.ts import _ from "lodash"; import { ethers } from "ethers"; -import * as grpc2 from "@grpc/grpc-js"; +import * as grpc from "@grpc/grpc-js"; import { Metadata } from "@grpc/grpc-js"; // src/auth.ts -var getKeyRequestMessage = (address, expiredAt) => { - return `key request for ${address} expired at ${expiredAt}`; -}; - -// grpc_codegen/avs_grpc_pb.js -var grpc = __require("@grpc/grpc-js"); -var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports)); -var google_protobuf_timestamp_pb2 = __require("google-protobuf/google/protobuf/timestamp_pb.js"); -var google_protobuf_wrappers_pb2 = __require("google-protobuf/google/protobuf/wrappers_pb.js"); -function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb.AddressRequest)) { - throw new Error("Expected argument of type aggregator.AddressRequest"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb.AddressResp)) { - throw new Error("Expected argument of type aggregator.AddressResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb.Checkin)) { - throw new Error("Expected argument of type aggregator.Checkin"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb.GetKeyReq)) { - throw new Error("Expected argument of type aggregator.GetKeyReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb.KeyResp)) { - throw new Error("Expected argument of type aggregator.KeyResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb.NonceRequest)) { - throw new Error("Expected argument of type aggregator.NonceRequest"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error("Expected argument of type aggregator.Task"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Task(buffer_arg) { - return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb.UUID)) { - throw new Error("Expected argument of type aggregator.UUID"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb.UUID.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb.UpdateChecksReq)) { - throw new Error("Expected argument of type aggregator.UpdateChecksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb2.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb2.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); -} -var AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb.GetKeyReq, - responseType: avs_pb.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb.NonceRequest, - responseType: avs_pb.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - requestStream: false, - responseStream: false, - requestType: avs_pb.AddressRequest, - responseType: avs_pb.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.CreateTaskReq, - responseType: avs_pb.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb.ListTasksReq, - responseType: avs_pb.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb.Checkin, - responseType: avs_pb.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp - } +var getKeyRequestMessage = (address2, expiredAt) => { + return `key request for ${address2} expired at ${expiredAt}`; }; -var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); // src/index.ts -init_avs_pb(); +var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); +var avs_pb = __toESM(require_avs_pb()); // src/types.ts var AUTH_KEY_HEADER = "authKey"; // src/task.ts -var Task2 = class { +var Task = class { // Add other missing properties here constructor(task) { this.id = task.getId()?.toString() || ""; @@ -4522,15 +5274,15 @@ var Task2 = class { this.executionsList = task.getExecutionsList(); } }; -var task_default = Task2; +var task_default = Task; // src/index.ts var BaseClient = class { constructor(opts) { this.endpoint = opts.endpoint; - this.rpcClient = new AggregatorClient( + this.rpcClient = new import_avs_grpc_pb.AggregatorClient( this.endpoint, - grpc2.credentials.createInsecure() + grpc.credentials.createInsecure() ); this.metadata = new Metadata(); } @@ -4545,31 +5297,37 @@ var BaseClient = class { return false; } } - async authWithAPIKey(apiKey, expiredAtEpoch) { - const request = new GetKeyReq(); - request.setOwner(""); + // When using the APIkey, depends on scope of the key, it may have access to one ore more account + async authWithAPIKey(address2, apiKey, expiredAtEpoch) { + const request = new avs_pb.GetKeyReq(); + request.setOwner(address2); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); const result = await this._callRPC("getKey", request); + this.authKey = result.getKey(); return { authKey: result.getKey() }; } // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address, signature, expiredAtEpoch) { - const request = new GetKeyReq(); - request.setOwner(address); + async authWithSignature(address2, signature, expiredAtEpoch) { + const request = new avs_pb.GetKeyReq(); + request.setOwner(address2); request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); let result = await this._callRPC( "getKey", request ); + console.log("my key is ", result, result.getKey()); + this.authKey = result.getKey(); return { authKey: result.getKey() }; } _callRPC(method, request, options) { const metadata = _.cloneDeep(this.metadata); - if (options?.authKey) { - metadata.set(AUTH_KEY_HEADER, options.authKey); + console.log("my authkey", this.authkey); + if (!this.authKey) { + throw new Error("Not authenticated yet"); } + metadata.set(AUTH_KEY_HEADER, options.authKey); return new Promise((resolve, reject) => { this.rpcClient[method].bind(this.rpcClient)( request, @@ -4581,56 +5339,68 @@ var BaseClient = class { ); }); } + _callAnonRPC(method, request, options) { + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + this.metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } }; var Client = class extends BaseClient { constructor(config) { super(config); } - async getAddresses(address, { authKey }) { - const request = new AddressRequest(); + async listSmartWallets() { + const request = new avs_pb.AddressRequest(); request.setOwner(address); - const result = await this._callRPC("getSmartAccountAddress", request, { authKey }); + const result = await this._callRPC("getSmartAccountAddress", request); return { owner: address, - smart_account_address: result.getSmartAccountAddress() + wallets: result.getWalletsList() }; } async createTask({ - address, + address: address2, oracleContract, tokenContract - }, { authKey }) { - const trigger = new TaskTrigger(); - trigger.setTriggerType(TriggerType.EXPRESSIONTRIGGER); + }) { + const trigger = new avs_pb.TaskTrigger(); + trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); trigger.setExpression( - new ExpressionCondition().setExpression(` + new avs_pb.ExpressionCondition().setExpression(` bigCmp( priceChainlink("${oracleContract}"), toBigInt("10000") ) > 0`) ); - const action = new TaskAction(); - action.setTaskType(TaskType.CONTRACTEXECUTIONTASK); + const action = new avs_pb.TaskAction(); + action.setTaskType(avs_pb.TaskType.CONTRACTEXECUTIONTASK); action.setId("transfer_erc20_1"); action.setName("Transfer Test Token"); - const execution = new ContractExecution(); + const execution = new avs_pb.ContractExecution(); execution.setContractAddress(tokenContract); let ABI = ["function transfer(address to, uint amount)"]; let iface = new ethers.Interface(ABI); const callData = iface.encodeFunctionData("transfer", [ - address, + address2, ethers.parseUnits("12", 18) ]); execution.setCallData(callData); action.setContractExecution(execution); - const request = new CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); + const request = new avs_pb.CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); const result = await this._callRPC("createTask", request, { authKey }); return { id: result.getId() }; } - async listTasks(address, { authKey }) { - const request = new ListTasksReq(); + async listTasks(address2) { + const request = new avs_pb.ListTasksReq(); const result = await this._callRPC("listTasks", request, { authKey }); const tasks = _.map( result.getTasksList(), @@ -4647,36 +5417,33 @@ var Client = class extends BaseClient { } // TODO: specify the return type to match client’s requirements // Right now we simply return the original object from the server - async getTask(id, { authKey }) { - const request = new UUID(); + async getTask(id) { + const request = new avs_pb.UUID(); request.setBytes(id); ``; const result = await this._callRPC( "getTask", - request, - { authKey } + request ); return new task_default(result); } - async cancelTask(id, { authKey }) { - const request = new UUID(); + async cancelTask(id) { + const request = new avs_pb.UUID(); request.setBytes(id); const result = await this._callRPC( "cancelTask", - request, - { authKey } + request ); return { value: result.getValue() }; } - async deleteTask(id, { authKey }) { - const request = new UUID(); + async deleteTask(id) { + const request = new avs_pb.UUID(); request.setBytes(id); const result = await this._callRPC( "deleteTask", - request, - { authKey } + request ); return { value: result.getValue() diff --git a/grpc_codegen/avs.proto b/grpc_codegen/avs.proto index a7cfeb8..8ca04e9 100644 --- a/grpc_codegen/avs.proto +++ b/grpc_codegen/avs.proto @@ -40,31 +40,23 @@ message SyncTasksReq { } enum TriggerType { - TimeTrigger = 0; - ContractQueryTrigger = 1; - ExpressionTrigger = 2; + ManualTrigger = 0; + FixedEpochTrigger = 1; + CronTrigger = 2; + BlockTrigger = 3; + EventTrigger = 4; } -message TaskTrigger { - TriggerType trigger_type = 1; - - TimeCondition schedule = 2; - ContractQueryCondition contract_query = 3; - ExpressionCondition expression = 4; +message FixedEpochCondition { + repeated int64 epoches = 1; } - // Simple timebase or cron syntax. -message TimeCondition { - repeated int64 fixed = 1; - string cron = 2; -} -// A contract method that return true/false -// Ideally to use when we already have an existing contract that perform the -// check. -// This method will be evaluate every block -message ContractQueryCondition { - string contract_address = 1; - string callmsg = 2; +message CronCondition { + repeated string cron_table = 1; +} + +message BlockCondition { + int64 interval = 1; } // An arbitrary expression to express the condition. @@ -77,10 +69,51 @@ message ContractQueryCondition { // When a new block is build, our engine will execute these check // // The expression language is re-present by https://expr-lang.org/ -message ExpressionCondition { +message EventCondition { string expression = 1; } +message TaskTrigger { + TriggerType trigger_type = 1; + + oneof trigger_condition { + bool manual = 2; + + // run at a specific epoch, name inspired by unix `at` utility + FixedEpochCondition at = 3; + + // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio + CronCondition cron = 4; + + // currently the only support syntax is every blocks + BlockCondition block = 5; + + // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address + EventCondition event = 6; + } +} + +// gRPC internal error code use up to 17, we extend and start from 1000 to avoid any conflict +// Guide: https://grpc.io/docs/guides/error/ +// Go: https://github.com/grpc/grpc-go/blob/master/codes/codes.go#L199 +enum Error { + // An error that happen when the app can be recovered but the cause is unknow, rarely use, we try to use specific error as much as we can + UnknowError = 0; + // internal rpc node error + RpcNodeError = 1000; + // storage system isn't available to respond to query + StorageUnavailable = 2000; + StorageWriteError = 2001; + // target chain of smart wallet is error and cannot used to determine smartwallet info + SmartWalletRpcError = 6000; + SmartWalletNotFoundError = 6001; + + // Error occurs when we failed to migrate task data and it cannot be decode + TaskDataCorrupted = 7000; + TaskDataMissingError = 7001; +} + + message SyncTasksResp { string id = 1; string checkType = 2; @@ -88,25 +121,6 @@ message SyncTasksResp { TaskTrigger trigger = 3; } -// TaskType represents what kind of work the task will perform -enum TaskType { - // Handle default/missing data - ETHTransferTask = 0; - - // Generic contract execution which can be used for: - // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc - // When executing a contract we need at least 2 things: - // - target contract address - // - the message to send to that contract - ContractExecutionTask = 1; - - GraphQLDataQueryTask = 2; - // Make call to a HTTP endpoint - HTTPAPICallTask = 3; - // CustomCode allow to run arbitraty JavaScript. - CustomCodeTask = 4; - BranchActionTask = 5; -} // TaskStatus represents status of the task. The transition is as follow enum TaskStatus { @@ -117,38 +131,48 @@ enum TaskStatus { Executing = 4; } -message ETHTransfer { +message ETHTransferNode { string destination = 1; string amount = 2; } -message ContractExecution { +message ContractWriteNode { + string contract_address = 1; + string call_data = 2; + + // abi is necessary to decode the return + string contract_abi = 3; +} + +message ContractQueryNode { string contract_address = 1; string call_data = 2; - string method = 3; - string encoded_params = 4; + // abi is necessary to decode the return + string contract_abi = 3; } -message GraphQLDataQuery { + +message GraphQLQueryNode { // TODO: support graphql variable string url = 1; string query = 2; } -message HTTPAPICall { +message RestAPINode { string url = 1; map headers = 2; string body = 3; + string method = 4; } enum CustomCodeType { JavaScript = 0; } -message CustomCode { +message CustomCodeNode { CustomCodeType type = 1; - string body = 2; + string source = 2; } message ConditionJump { @@ -156,113 +180,173 @@ message ConditionJump { string next = 2; } -message BranchAction { - ConditionJump If = 1; - repeated ConditionJump ElseIfs = 2; - ConditionJump Else = 3; +message BranchNode { + ConditionJump if = 1; + repeated ConditionJump elseIfs = 2; + ConditionJump else = 3; } -message TaskAction { - TaskType task_type = 1; +message FilterNode { + // Filter node acts like .select or .filter to pluck out element in an array that evaluate the expression to true + string expression = 1; +} - string id = 2; - string name = 3; +// The edge is relationship or direct between node +message TaskEdge { + string id = 1 ; + string source = 2 ; + string target = 3 ; +} + +// TaskType represents what kind of work the task will perform +enum TaskType { + // Handle default/missing data + ETHTransferTask = 0; + + // Generic contract execution which can be used for: + // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc + // When executing a contract we need at least 2 things: + // - target contract address + // - the message to send to that contract + ContractWriteTask = 1; + ContractReadTask = 2; + + // GraphQL query. Note that a graphql can also be query as a HTTP API, but having its own graphql type make writing query easiser without passing all the data in post as parameter. + GraphQLDataQueryTask = 3; - // Next can be empty. In some kind of block, such as branching, the next is - // based on branching condition - repeated string next = 4; - - // Transfer eth - ETHTransfer eth_transfer = 10; - // Run one ore more contracts. The call call also be batched with tool like - // multicall to wrap many calls - ContractExecution contract_execution = 11; - // Make call to a graphql endpoint - GraphQLDataQuery graphql_data_query = 12; // Make call to a HTTP endpoint - HTTPAPICall http_data_query = 13; + RestAPITask = 4; + // CustomCode allow to run arbitraty JavaScript. - CustomCode custom_code = 14; - BranchAction branch = 15; + BranchTask = 5; + FilterTask = 6; + CustomCodeTask = 7; +} + +message TaskNode { + TaskType node_type = 1; + string id = 2; + string name = 3; + + // based on node_type one and only one of these field are set + oneof task_body { + // Transfer eth require no calldata etc, just a destination address and an eth amount to be sent + ETHTransferNode eth_transfer = 10; + + // Run one ore more contracts. The call call also be batched with tool like + // multicall to wrap many calls. in a contract write, we need to generate signature and send as userops. + ContractWriteNode contract_write = 11; + // read data fron a target contract + ContractQueryNode contract_read = 12; + // Make call to a graphql endpoint + GraphQLQueryNode graphql_data_query = 13; + // Make call to a HTTP endpoint + RestAPINode rest_api = 14; + // CustomCode allow to run arbitraty JavaScript. + BranchNode branch = 15; + FilterNode filter = 16; + CustomCodeNode custom_code = 17; + } } message Execution { - int64 epoch = 1; + int64 epoch = 1; string user_op_hash = 2; - string error = 3; + string error = 3; } message Task { - UUID id = 1; - string owner = 2; - string smart_account_address = 3; - TaskTrigger trigger = 4; - repeated TaskAction nodes = 5; - - // task won't be check before this - int64 start_at = 6; - // task won't be run/check after this - int64 expired_at = 7; - // arbitrary data about this task - string memo = 8; - - int64 completed_at = 9; - TaskStatus status = 10; - // repeatable means a task can continue to run even after the first execution - bool repeatable = 11; - repeated Execution executions = 12; + UUID id = 1; + string owner = 2; + string smart_wallet_address = 3; + + // task won't be check before this + int64 start_at = 5; + // task won't be run/check after this + int64 expired_at = 6; + // arbitrary data about this task. has a limit of 255 character + string memo = 7; + + int64 completed_at = 8; + + // repeatable means a task can continue to run even after the first execution. + // By default, recurring is false, task will only executed once. + bool recurring = 10; + + TaskStatus status = 9; + TaskTrigger trigger = 4; + repeated TaskNode nodes = 11; + repeated TaskEdge edges = 12; + + repeated Execution executions = 13; } + message CreateTaskReq { - TaskTrigger trigger = 1; - repeated TaskAction actions = 2; - int64 start_at = 3; - int64 expired_at = 4; - string memo = 5; + TaskTrigger trigger = 1; + + int64 start_at = 2; + int64 expired_at = 3; + // A repeatable task will continue to be run - bool repeatable = 6; + bool repeatable = 4; + + // the smart wallet address that will be used to run this task + // When leaving out, we will use the default(salt=0) wallet + string smart_wallet_address = 5; + + string memo = 6; + repeated TaskNode nodes = 7; + repeated TaskEdge edges = 8; } message CreateTaskResp { - string id = 1; + string id = 1; } message NonceRequest { - string owner = 1; + string owner = 1; } message NonceResp { - string nonce = 1; + string nonce = 1; } message AddressRequest { - string owner = 1; + // filter out by factory address or salt + // otherwise return all the wallet + string factory = 1; + string salt = 2; +} + +message SmartWallet { + string address = 1; + string salt = 2; + string factory = 3; } message AddressResp { - string smart_account_address = 1; - string nonce = 2; + repeated SmartWallet wallets = 1; } -message ListTasksReq {} -message ListTasksResp { - message TaskItemResp { - string id = 1; - TaskStatus status = 2; - } +message ListTasksReq { + // Filter out by the smart_wallet_address + string smart_wallet_address = 1; +} - repeated TaskItemResp tasks = 1; +message ListTasksResp { + repeated Task tasks = 1; } message GetKeyReq { - string owner = 1; - int64 expired_at = 2; - string signature = 3; + string owner = 1; + int64 expired_at = 2; + string signature = 3; } message KeyResp { - string key=1; + string key=1; } message UpdateChecksReq { @@ -275,20 +359,31 @@ message UpdateChecksResp { google.protobuf.Timestamp updated_at = 1; } +message CreateWalletReq { + string salt = 1; + // this is the factory address for the wallet, when leaving its empty, we will use our default factory address + string factory_address = 2; +} + +message CreateWalletResp { + string address = 1; +} + service Aggregator { // Auth rpc GetKey(GetKeyReq) returns (KeyResp) {}; // Smart Acccount - rpc GetNonce(NonceRequest) returns (NonceResp) {}; + rpc GetNonce(NonceRequest) returns (NonceResp) {}; rpc GetSmartAccountAddress(AddressRequest) returns (AddressResp) {}; // Task Management - rpc CreateTask(CreateTaskReq) returns (CreateTaskResp) {}; - rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; - rpc GetTask(UUID) returns (Task) {}; - rpc CancelTask(UUID) returns (google.protobuf.BoolValue) {}; - rpc DeleteTask(UUID) returns (google.protobuf.BoolValue) {}; + rpc CreateWallet(CreateWalletReq) returns (CreateWalletResp) {}; + rpc CreateTask(CreateTaskReq) returns (CreateTaskResp) {}; + rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; + rpc GetTask(UUID) returns (Task) {}; + rpc CancelTask(UUID) returns (google.protobuf.BoolValue) {}; + rpc DeleteTask(UUID) returns (google.protobuf.BoolValue) {}; // Operator endpoint rpc Ping(Checkin) returns (CheckinResp) {}; diff --git a/grpc_codegen/avs.ts b/grpc_codegen/avs.ts deleted file mode 100644 index d8b0972..0000000 --- a/grpc_codegen/avs.ts +++ /dev/null @@ -1,3720 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.2.5 -// protoc v3.19.1 -// source: avs.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -import { Observable } from "rxjs"; -import { map } from "rxjs/operators"; -import { Timestamp } from "./google/protobuf/timestamp"; -import { BoolValue } from "./google/protobuf/wrappers"; - -export const protobufPackage = "aggregator"; - -export enum TriggerType { - TimeTrigger = 0, - ContractQueryTrigger = 1, - ExpressionTrigger = 2, - UNRECOGNIZED = -1, -} - -export function triggerTypeFromJSON(object: any): TriggerType { - switch (object) { - case 0: - case "TimeTrigger": - return TriggerType.TimeTrigger; - case 1: - case "ContractQueryTrigger": - return TriggerType.ContractQueryTrigger; - case 2: - case "ExpressionTrigger": - return TriggerType.ExpressionTrigger; - case -1: - case "UNRECOGNIZED": - default: - return TriggerType.UNRECOGNIZED; - } -} - -export function triggerTypeToJSON(object: TriggerType): string { - switch (object) { - case TriggerType.TimeTrigger: - return "TimeTrigger"; - case TriggerType.ContractQueryTrigger: - return "ContractQueryTrigger"; - case TriggerType.ExpressionTrigger: - return "ExpressionTrigger"; - case TriggerType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** TaskType represents what kind of work the task will perform */ -export enum TaskType { - /** ETHTransferTask - Handle default/missing data */ - ETHTransferTask = 0, - /** - * ContractExecutionTask - Generic contract execution which can be used for: - * ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc - * When executing a contract we need at least 2 things: - * - target contract address - * - the message to send to that contract - */ - ContractExecutionTask = 1, - GraphQLDataQueryTask = 2, - /** HTTPAPICallTask - Make call to a HTTP endpoint */ - HTTPAPICallTask = 3, - /** CustomCodeTask - CustomCode allow to run arbitraty JavaScript. */ - CustomCodeTask = 4, - BranchActionTask = 5, - UNRECOGNIZED = -1, -} - -export function taskTypeFromJSON(object: any): TaskType { - switch (object) { - case 0: - case "ETHTransferTask": - return TaskType.ETHTransferTask; - case 1: - case "ContractExecutionTask": - return TaskType.ContractExecutionTask; - case 2: - case "GraphQLDataQueryTask": - return TaskType.GraphQLDataQueryTask; - case 3: - case "HTTPAPICallTask": - return TaskType.HTTPAPICallTask; - case 4: - case "CustomCodeTask": - return TaskType.CustomCodeTask; - case 5: - case "BranchActionTask": - return TaskType.BranchActionTask; - case -1: - case "UNRECOGNIZED": - default: - return TaskType.UNRECOGNIZED; - } -} - -export function taskTypeToJSON(object: TaskType): string { - switch (object) { - case TaskType.ETHTransferTask: - return "ETHTransferTask"; - case TaskType.ContractExecutionTask: - return "ContractExecutionTask"; - case TaskType.GraphQLDataQueryTask: - return "GraphQLDataQueryTask"; - case TaskType.HTTPAPICallTask: - return "HTTPAPICallTask"; - case TaskType.CustomCodeTask: - return "CustomCodeTask"; - case TaskType.BranchActionTask: - return "BranchActionTask"; - case TaskType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** TaskStatus represents status of the task. The transition is as follow */ -export enum TaskStatus { - Active = 0, - Completed = 1, - Failed = 2, - Canceled = 3, - Executing = 4, - UNRECOGNIZED = -1, -} - -export function taskStatusFromJSON(object: any): TaskStatus { - switch (object) { - case 0: - case "Active": - return TaskStatus.Active; - case 1: - case "Completed": - return TaskStatus.Completed; - case 2: - case "Failed": - return TaskStatus.Failed; - case 3: - case "Canceled": - return TaskStatus.Canceled; - case 4: - case "Executing": - return TaskStatus.Executing; - case -1: - case "UNRECOGNIZED": - default: - return TaskStatus.UNRECOGNIZED; - } -} - -export function taskStatusToJSON(object: TaskStatus): string { - switch (object) { - case TaskStatus.Active: - return "Active"; - case TaskStatus.Completed: - return "Completed"; - case TaskStatus.Failed: - return "Failed"; - case TaskStatus.Canceled: - return "Canceled"; - case TaskStatus.Executing: - return "Executing"; - case TaskStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum CustomCodeType { - JavaScript = 0, - UNRECOGNIZED = -1, -} - -export function customCodeTypeFromJSON(object: any): CustomCodeType { - switch (object) { - case 0: - case "JavaScript": - return CustomCodeType.JavaScript; - case -1: - case "UNRECOGNIZED": - default: - return CustomCodeType.UNRECOGNIZED; - } -} - -export function customCodeTypeToJSON(object: CustomCodeType): string { - switch (object) { - case CustomCodeType.JavaScript: - return "JavaScript"; - case CustomCodeType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface UUID { - bytes: string; -} - -export interface Checkin { - id: string; - address: string; - signature: string; - status: Checkin_Status | undefined; - version: string; - metricsPort: number; - remoteIP: string; -} - -export interface Checkin_Status { - uptime: number; - queueDepth: number; - lastHeartbeat: Date | undefined; -} - -export interface CheckinResp { - updatedAt: Date | undefined; -} - -export interface SyncTasksReq { - id: string; - address: string; - signature: string; - monotonicClock: number; -} - -export interface TaskTrigger { - triggerType: TriggerType; - schedule: TimeCondition | undefined; - contractQuery: ContractQueryCondition | undefined; - expression: ExpressionCondition | undefined; -} - -/** Simple timebase or cron syntax. */ -export interface TimeCondition { - fixed: number[]; - cron: string; -} - -/** - * A contract method that return true/false - * Ideally to use when we already have an existing contract that perform the - * check. - * This method will be evaluate every block - */ -export interface ContractQueryCondition { - contractAddress: string; - callmsg: string; -} - -/** - * An arbitrary expression to express the condition. - * People can define condition example - * chainlinkPrice("address-of-eth-usd-pair") > 2644500 && queryContract("contractaddress", "callmsg")[2] < = 5 - * By allow arbitrary expression, people can mix and match to create conplex - * condition that match their workload - * - * The function to be used need to be pre-defined on our task egnine runtime. - * When a new block is build, our engine will execute these check - * - * The expression language is re-present by https://expr-lang.org/ - */ -export interface ExpressionCondition { - expression: string; -} - -export interface SyncTasksResp { - id: string; - checkType: string; - trigger: TaskTrigger | undefined; -} - -export interface ETHTransfer { - destination: string; - amount: string; -} - -export interface ContractExecution { - contractAddress: string; - callData: string; - method: string; - encodedParams: string; -} - -export interface GraphQLDataQuery { - /** TODO: support graphql variable */ - url: string; - query: string; -} - -export interface HTTPAPICall { - url: string; - headers: { [key: string]: string }; - body: string; -} - -export interface HTTPAPICall_HeadersEntry { - key: string; - value: string; -} - -export interface CustomCode { - type: CustomCodeType; - body: string; -} - -export interface ConditionJump { - expression: string; - next: string; -} - -export interface BranchAction { - If: ConditionJump | undefined; - ElseIfs: ConditionJump[]; - Else: ConditionJump | undefined; -} - -export interface TaskAction { - taskType: TaskType; - id: string; - name: string; - /** - * Next can be empty. In some kind of block, such as branching, the next is - * based on branching condition - */ - next: string[]; - /** Transfer eth */ - ethTransfer: - | ETHTransfer - | undefined; - /** - * Run one ore more contracts. The call call also be batched with tool like - * multicall to wrap many calls - */ - contractExecution: - | ContractExecution - | undefined; - /** Make call to a graphql endpoint */ - graphqlDataQuery: - | GraphQLDataQuery - | undefined; - /** Make call to a HTTP endpoint */ - httpDataQuery: - | HTTPAPICall - | undefined; - /** CustomCode allow to run arbitraty JavaScript. */ - customCode: CustomCode | undefined; - branch: BranchAction | undefined; -} - -export interface Execution { - epoch: number; - userOpHash: string; - error: string; -} - -export interface Task { - id: UUID | undefined; - owner: string; - smartAccountAddress: string; - trigger: TaskTrigger | undefined; - nodes: TaskAction[]; - /** task won't be check before this */ - startAt: number; - /** task won't be run/check after this */ - expiredAt: number; - /** arbitrary data about this task */ - memo: string; - completedAt: number; - status: TaskStatus; - /** repeatable means a task can continue to run even after the first execution */ - repeatable: boolean; - executions: Execution[]; -} - -export interface CreateTaskReq { - trigger: TaskTrigger | undefined; - actions: TaskAction[]; - startAt: number; - expiredAt: number; - memo: string; - /** A repeatable task will continue to be run */ - repeatable: boolean; -} - -export interface CreateTaskResp { - id: string; -} - -export interface NonceRequest { - owner: string; -} - -export interface NonceResp { - nonce: string; -} - -export interface AddressRequest { - owner: string; -} - -export interface AddressResp { - smartAccountAddress: string; - nonce: string; -} - -export interface ListTasksReq { -} - -export interface ListTasksResp { - tasks: ListTasksResp_TaskItemResp[]; -} - -export interface ListTasksResp_TaskItemResp { - id: string; - status: TaskStatus; -} - -export interface GetKeyReq { - owner: string; - expiredAt: number; - signature: string; -} - -export interface KeyResp { - key: string; -} - -export interface UpdateChecksReq { - address: string; - signature: string; - id: string[]; -} - -export interface UpdateChecksResp { - updatedAt: Date | undefined; -} - -function createBaseUUID(): UUID { - return { bytes: "" }; -} - -export const UUID: MessageFns = { - encode(message: UUID, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.bytes !== "") { - writer.uint32(10).string(message.bytes); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UUID { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUUID(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.bytes = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): UUID { - return { bytes: isSet(object.bytes) ? globalThis.String(object.bytes) : "" }; - }, - - toJSON(message: UUID): unknown { - const obj: any = {}; - if (message.bytes !== "") { - obj.bytes = message.bytes; - } - return obj; - }, - - create, I>>(base?: I): UUID { - return UUID.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): UUID { - const message = createBaseUUID(); - message.bytes = object.bytes ?? ""; - return message; - }, -}; - -function createBaseCheckin(): Checkin { - return { id: "", address: "", signature: "", status: undefined, version: "", metricsPort: 0, remoteIP: "" }; -} - -export const Checkin: MessageFns = { - encode(message: Checkin, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - if (message.status !== undefined) { - Checkin_Status.encode(message.status, writer.uint32(34).fork()).join(); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.metricsPort !== 0) { - writer.uint32(48).int32(message.metricsPort); - } - if (message.remoteIP !== "") { - writer.uint32(58).string(message.remoteIP); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Checkin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.address = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.signature = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.status = Checkin_Status.decode(reader, reader.uint32()); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.version = reader.string(); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.metricsPort = reader.int32(); - continue; - } - case 7: { - if (tag !== 58) { - break; - } - - message.remoteIP = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Checkin { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - address: isSet(object.address) ? globalThis.String(object.address) : "", - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - status: isSet(object.status) ? Checkin_Status.fromJSON(object.status) : undefined, - version: isSet(object.version) ? globalThis.String(object.version) : "", - metricsPort: isSet(object.metricsPort) ? globalThis.Number(object.metricsPort) : 0, - remoteIP: isSet(object.remoteIP) ? globalThis.String(object.remoteIP) : "", - }; - }, - - toJSON(message: Checkin): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.address !== "") { - obj.address = message.address; - } - if (message.signature !== "") { - obj.signature = message.signature; - } - if (message.status !== undefined) { - obj.status = Checkin_Status.toJSON(message.status); - } - if (message.version !== "") { - obj.version = message.version; - } - if (message.metricsPort !== 0) { - obj.metricsPort = Math.round(message.metricsPort); - } - if (message.remoteIP !== "") { - obj.remoteIP = message.remoteIP; - } - return obj; - }, - - create, I>>(base?: I): Checkin { - return Checkin.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Checkin { - const message = createBaseCheckin(); - message.id = object.id ?? ""; - message.address = object.address ?? ""; - message.signature = object.signature ?? ""; - message.status = (object.status !== undefined && object.status !== null) - ? Checkin_Status.fromPartial(object.status) - : undefined; - message.version = object.version ?? ""; - message.metricsPort = object.metricsPort ?? 0; - message.remoteIP = object.remoteIP ?? ""; - return message; - }, -}; - -function createBaseCheckin_Status(): Checkin_Status { - return { uptime: 0, queueDepth: 0, lastHeartbeat: undefined }; -} - -export const Checkin_Status: MessageFns = { - encode(message: Checkin_Status, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.uptime !== 0) { - writer.uint32(8).int64(message.uptime); - } - if (message.queueDepth !== 0) { - writer.uint32(16).int64(message.queueDepth); - } - if (message.lastHeartbeat !== undefined) { - Timestamp.encode(toTimestamp(message.lastHeartbeat), writer.uint32(26).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Checkin_Status { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckin_Status(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.uptime = longToNumber(reader.int64()); - continue; - } - case 2: { - if (tag !== 16) { - break; - } - - message.queueDepth = longToNumber(reader.int64()); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.lastHeartbeat = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Checkin_Status { - return { - uptime: isSet(object.uptime) ? globalThis.Number(object.uptime) : 0, - queueDepth: isSet(object.queueDepth) ? globalThis.Number(object.queueDepth) : 0, - lastHeartbeat: isSet(object.lastHeartbeat) ? fromJsonTimestamp(object.lastHeartbeat) : undefined, - }; - }, - - toJSON(message: Checkin_Status): unknown { - const obj: any = {}; - if (message.uptime !== 0) { - obj.uptime = Math.round(message.uptime); - } - if (message.queueDepth !== 0) { - obj.queueDepth = Math.round(message.queueDepth); - } - if (message.lastHeartbeat !== undefined) { - obj.lastHeartbeat = message.lastHeartbeat.toISOString(); - } - return obj; - }, - - create, I>>(base?: I): Checkin_Status { - return Checkin_Status.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Checkin_Status { - const message = createBaseCheckin_Status(); - message.uptime = object.uptime ?? 0; - message.queueDepth = object.queueDepth ?? 0; - message.lastHeartbeat = object.lastHeartbeat ?? undefined; - return message; - }, -}; - -function createBaseCheckinResp(): CheckinResp { - return { updatedAt: undefined }; -} - -export const CheckinResp: MessageFns = { - encode(message: CheckinResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.updatedAt !== undefined) { - Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(10).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CheckinResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckinResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CheckinResp { - return { updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined }; - }, - - toJSON(message: CheckinResp): unknown { - const obj: any = {}; - if (message.updatedAt !== undefined) { - obj.updatedAt = message.updatedAt.toISOString(); - } - return obj; - }, - - create, I>>(base?: I): CheckinResp { - return CheckinResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CheckinResp { - const message = createBaseCheckinResp(); - message.updatedAt = object.updatedAt ?? undefined; - return message; - }, -}; - -function createBaseSyncTasksReq(): SyncTasksReq { - return { id: "", address: "", signature: "", monotonicClock: 0 }; -} - -export const SyncTasksReq: MessageFns = { - encode(message: SyncTasksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - if (message.monotonicClock !== 0) { - writer.uint32(32).int64(message.monotonicClock); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): SyncTasksReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyncTasksReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.address = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.signature = reader.string(); - continue; - } - case 4: { - if (tag !== 32) { - break; - } - - message.monotonicClock = longToNumber(reader.int64()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): SyncTasksReq { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - address: isSet(object.address) ? globalThis.String(object.address) : "", - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - monotonicClock: isSet(object.monotonicClock) ? globalThis.Number(object.monotonicClock) : 0, - }; - }, - - toJSON(message: SyncTasksReq): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.address !== "") { - obj.address = message.address; - } - if (message.signature !== "") { - obj.signature = message.signature; - } - if (message.monotonicClock !== 0) { - obj.monotonicClock = Math.round(message.monotonicClock); - } - return obj; - }, - - create, I>>(base?: I): SyncTasksReq { - return SyncTasksReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): SyncTasksReq { - const message = createBaseSyncTasksReq(); - message.id = object.id ?? ""; - message.address = object.address ?? ""; - message.signature = object.signature ?? ""; - message.monotonicClock = object.monotonicClock ?? 0; - return message; - }, -}; - -function createBaseTaskTrigger(): TaskTrigger { - return { triggerType: 0, schedule: undefined, contractQuery: undefined, expression: undefined }; -} - -export const TaskTrigger: MessageFns = { - encode(message: TaskTrigger, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.triggerType !== 0) { - writer.uint32(8).int32(message.triggerType); - } - if (message.schedule !== undefined) { - TimeCondition.encode(message.schedule, writer.uint32(18).fork()).join(); - } - if (message.contractQuery !== undefined) { - ContractQueryCondition.encode(message.contractQuery, writer.uint32(26).fork()).join(); - } - if (message.expression !== undefined) { - ExpressionCondition.encode(message.expression, writer.uint32(34).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskTrigger { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTaskTrigger(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.triggerType = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.schedule = TimeCondition.decode(reader, reader.uint32()); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.contractQuery = ContractQueryCondition.decode(reader, reader.uint32()); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.expression = ExpressionCondition.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): TaskTrigger { - return { - triggerType: isSet(object.triggerType) ? triggerTypeFromJSON(object.triggerType) : 0, - schedule: isSet(object.schedule) ? TimeCondition.fromJSON(object.schedule) : undefined, - contractQuery: isSet(object.contractQuery) ? ContractQueryCondition.fromJSON(object.contractQuery) : undefined, - expression: isSet(object.expression) ? ExpressionCondition.fromJSON(object.expression) : undefined, - }; - }, - - toJSON(message: TaskTrigger): unknown { - const obj: any = {}; - if (message.triggerType !== 0) { - obj.triggerType = triggerTypeToJSON(message.triggerType); - } - if (message.schedule !== undefined) { - obj.schedule = TimeCondition.toJSON(message.schedule); - } - if (message.contractQuery !== undefined) { - obj.contractQuery = ContractQueryCondition.toJSON(message.contractQuery); - } - if (message.expression !== undefined) { - obj.expression = ExpressionCondition.toJSON(message.expression); - } - return obj; - }, - - create, I>>(base?: I): TaskTrigger { - return TaskTrigger.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): TaskTrigger { - const message = createBaseTaskTrigger(); - message.triggerType = object.triggerType ?? 0; - message.schedule = (object.schedule !== undefined && object.schedule !== null) - ? TimeCondition.fromPartial(object.schedule) - : undefined; - message.contractQuery = (object.contractQuery !== undefined && object.contractQuery !== null) - ? ContractQueryCondition.fromPartial(object.contractQuery) - : undefined; - message.expression = (object.expression !== undefined && object.expression !== null) - ? ExpressionCondition.fromPartial(object.expression) - : undefined; - return message; - }, -}; - -function createBaseTimeCondition(): TimeCondition { - return { fixed: [], cron: "" }; -} - -export const TimeCondition: MessageFns = { - encode(message: TimeCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.fixed) { - writer.int64(v); - } - writer.join(); - if (message.cron !== "") { - writer.uint32(18).string(message.cron); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TimeCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimeCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag === 8) { - message.fixed.push(longToNumber(reader.int64())); - - continue; - } - - if (tag === 10) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.fixed.push(longToNumber(reader.int64())); - } - - continue; - } - - break; - } - case 2: { - if (tag !== 18) { - break; - } - - message.cron = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimeCondition { - return { - fixed: globalThis.Array.isArray(object?.fixed) ? object.fixed.map((e: any) => globalThis.Number(e)) : [], - cron: isSet(object.cron) ? globalThis.String(object.cron) : "", - }; - }, - - toJSON(message: TimeCondition): unknown { - const obj: any = {}; - if (message.fixed?.length) { - obj.fixed = message.fixed.map((e) => Math.round(e)); - } - if (message.cron !== "") { - obj.cron = message.cron; - } - return obj; - }, - - create, I>>(base?: I): TimeCondition { - return TimeCondition.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): TimeCondition { - const message = createBaseTimeCondition(); - message.fixed = object.fixed?.map((e) => e) || []; - message.cron = object.cron ?? ""; - return message; - }, -}; - -function createBaseContractQueryCondition(): ContractQueryCondition { - return { contractAddress: "", callmsg: "" }; -} - -export const ContractQueryCondition: MessageFns = { - encode(message: ContractQueryCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.callmsg !== "") { - writer.uint32(18).string(message.callmsg); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ContractQueryCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContractQueryCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.contractAddress = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.callmsg = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ContractQueryCondition { - return { - contractAddress: isSet(object.contractAddress) ? globalThis.String(object.contractAddress) : "", - callmsg: isSet(object.callmsg) ? globalThis.String(object.callmsg) : "", - }; - }, - - toJSON(message: ContractQueryCondition): unknown { - const obj: any = {}; - if (message.contractAddress !== "") { - obj.contractAddress = message.contractAddress; - } - if (message.callmsg !== "") { - obj.callmsg = message.callmsg; - } - return obj; - }, - - create, I>>(base?: I): ContractQueryCondition { - return ContractQueryCondition.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ContractQueryCondition { - const message = createBaseContractQueryCondition(); - message.contractAddress = object.contractAddress ?? ""; - message.callmsg = object.callmsg ?? ""; - return message; - }, -}; - -function createBaseExpressionCondition(): ExpressionCondition { - return { expression: "" }; -} - -export const ExpressionCondition: MessageFns = { - encode(message: ExpressionCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.expression !== "") { - writer.uint32(10).string(message.expression); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ExpressionCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExpressionCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.expression = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ExpressionCondition { - return { expression: isSet(object.expression) ? globalThis.String(object.expression) : "" }; - }, - - toJSON(message: ExpressionCondition): unknown { - const obj: any = {}; - if (message.expression !== "") { - obj.expression = message.expression; - } - return obj; - }, - - create, I>>(base?: I): ExpressionCondition { - return ExpressionCondition.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ExpressionCondition { - const message = createBaseExpressionCondition(); - message.expression = object.expression ?? ""; - return message; - }, -}; - -function createBaseSyncTasksResp(): SyncTasksResp { - return { id: "", checkType: "", trigger: undefined }; -} - -export const SyncTasksResp: MessageFns = { - encode(message: SyncTasksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.checkType !== "") { - writer.uint32(18).string(message.checkType); - } - if (message.trigger !== undefined) { - TaskTrigger.encode(message.trigger, writer.uint32(26).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): SyncTasksResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyncTasksResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.checkType = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.trigger = TaskTrigger.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): SyncTasksResp { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - checkType: isSet(object.checkType) ? globalThis.String(object.checkType) : "", - trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined, - }; - }, - - toJSON(message: SyncTasksResp): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.checkType !== "") { - obj.checkType = message.checkType; - } - if (message.trigger !== undefined) { - obj.trigger = TaskTrigger.toJSON(message.trigger); - } - return obj; - }, - - create, I>>(base?: I): SyncTasksResp { - return SyncTasksResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): SyncTasksResp { - const message = createBaseSyncTasksResp(); - message.id = object.id ?? ""; - message.checkType = object.checkType ?? ""; - message.trigger = (object.trigger !== undefined && object.trigger !== null) - ? TaskTrigger.fromPartial(object.trigger) - : undefined; - return message; - }, -}; - -function createBaseETHTransfer(): ETHTransfer { - return { destination: "", amount: "" }; -} - -export const ETHTransfer: MessageFns = { - encode(message: ETHTransfer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.destination !== "") { - writer.uint32(10).string(message.destination); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ETHTransfer { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseETHTransfer(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.destination = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.amount = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ETHTransfer { - return { - destination: isSet(object.destination) ? globalThis.String(object.destination) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "", - }; - }, - - toJSON(message: ETHTransfer): unknown { - const obj: any = {}; - if (message.destination !== "") { - obj.destination = message.destination; - } - if (message.amount !== "") { - obj.amount = message.amount; - } - return obj; - }, - - create, I>>(base?: I): ETHTransfer { - return ETHTransfer.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ETHTransfer { - const message = createBaseETHTransfer(); - message.destination = object.destination ?? ""; - message.amount = object.amount ?? ""; - return message; - }, -}; - -function createBaseContractExecution(): ContractExecution { - return { contractAddress: "", callData: "", method: "", encodedParams: "" }; -} - -export const ContractExecution: MessageFns = { - encode(message: ContractExecution, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.callData !== "") { - writer.uint32(18).string(message.callData); - } - if (message.method !== "") { - writer.uint32(26).string(message.method); - } - if (message.encodedParams !== "") { - writer.uint32(34).string(message.encodedParams); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ContractExecution { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContractExecution(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.contractAddress = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.callData = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.method = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.encodedParams = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ContractExecution { - return { - contractAddress: isSet(object.contractAddress) ? globalThis.String(object.contractAddress) : "", - callData: isSet(object.callData) ? globalThis.String(object.callData) : "", - method: isSet(object.method) ? globalThis.String(object.method) : "", - encodedParams: isSet(object.encodedParams) ? globalThis.String(object.encodedParams) : "", - }; - }, - - toJSON(message: ContractExecution): unknown { - const obj: any = {}; - if (message.contractAddress !== "") { - obj.contractAddress = message.contractAddress; - } - if (message.callData !== "") { - obj.callData = message.callData; - } - if (message.method !== "") { - obj.method = message.method; - } - if (message.encodedParams !== "") { - obj.encodedParams = message.encodedParams; - } - return obj; - }, - - create, I>>(base?: I): ContractExecution { - return ContractExecution.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ContractExecution { - const message = createBaseContractExecution(); - message.contractAddress = object.contractAddress ?? ""; - message.callData = object.callData ?? ""; - message.method = object.method ?? ""; - message.encodedParams = object.encodedParams ?? ""; - return message; - }, -}; - -function createBaseGraphQLDataQuery(): GraphQLDataQuery { - return { url: "", query: "" }; -} - -export const GraphQLDataQuery: MessageFns = { - encode(message: GraphQLDataQuery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.url !== "") { - writer.uint32(10).string(message.url); - } - if (message.query !== "") { - writer.uint32(18).string(message.query); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GraphQLDataQuery { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGraphQLDataQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.url = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.query = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): GraphQLDataQuery { - return { - url: isSet(object.url) ? globalThis.String(object.url) : "", - query: isSet(object.query) ? globalThis.String(object.query) : "", - }; - }, - - toJSON(message: GraphQLDataQuery): unknown { - const obj: any = {}; - if (message.url !== "") { - obj.url = message.url; - } - if (message.query !== "") { - obj.query = message.query; - } - return obj; - }, - - create, I>>(base?: I): GraphQLDataQuery { - return GraphQLDataQuery.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): GraphQLDataQuery { - const message = createBaseGraphQLDataQuery(); - message.url = object.url ?? ""; - message.query = object.query ?? ""; - return message; - }, -}; - -function createBaseHTTPAPICall(): HTTPAPICall { - return { url: "", headers: {}, body: "" }; -} - -export const HTTPAPICall: MessageFns = { - encode(message: HTTPAPICall, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.url !== "") { - writer.uint32(10).string(message.url); - } - Object.entries(message.headers).forEach(([key, value]) => { - HTTPAPICall_HeadersEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join(); - }); - if (message.body !== "") { - writer.uint32(26).string(message.body); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): HTTPAPICall { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHTTPAPICall(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.url = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - const entry2 = HTTPAPICall_HeadersEntry.decode(reader, reader.uint32()); - if (entry2.value !== undefined) { - message.headers[entry2.key] = entry2.value; - } - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.body = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): HTTPAPICall { - return { - url: isSet(object.url) ? globalThis.String(object.url) : "", - headers: isObject(object.headers) - ? Object.entries(object.headers).reduce<{ [key: string]: string }>((acc, [key, value]) => { - acc[key] = String(value); - return acc; - }, {}) - : {}, - body: isSet(object.body) ? globalThis.String(object.body) : "", - }; - }, - - toJSON(message: HTTPAPICall): unknown { - const obj: any = {}; - if (message.url !== "") { - obj.url = message.url; - } - if (message.headers) { - const entries = Object.entries(message.headers); - if (entries.length > 0) { - obj.headers = {}; - entries.forEach(([k, v]) => { - obj.headers[k] = v; - }); - } - } - if (message.body !== "") { - obj.body = message.body; - } - return obj; - }, - - create, I>>(base?: I): HTTPAPICall { - return HTTPAPICall.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): HTTPAPICall { - const message = createBaseHTTPAPICall(); - message.url = object.url ?? ""; - message.headers = Object.entries(object.headers ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = globalThis.String(value); - } - return acc; - }, {}); - message.body = object.body ?? ""; - return message; - }, -}; - -function createBaseHTTPAPICall_HeadersEntry(): HTTPAPICall_HeadersEntry { - return { key: "", value: "" }; -} - -export const HTTPAPICall_HeadersEntry: MessageFns = { - encode(message: HTTPAPICall_HeadersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): HTTPAPICall_HeadersEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHTTPAPICall_HeadersEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.value = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): HTTPAPICall_HeadersEntry { - return { - key: isSet(object.key) ? globalThis.String(object.key) : "", - value: isSet(object.value) ? globalThis.String(object.value) : "", - }; - }, - - toJSON(message: HTTPAPICall_HeadersEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== "") { - obj.value = message.value; - } - return obj; - }, - - create, I>>(base?: I): HTTPAPICall_HeadersEntry { - return HTTPAPICall_HeadersEntry.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): HTTPAPICall_HeadersEntry { - const message = createBaseHTTPAPICall_HeadersEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, -}; - -function createBaseCustomCode(): CustomCode { - return { type: 0, body: "" }; -} - -export const CustomCode: MessageFns = { - encode(message: CustomCode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.body !== "") { - writer.uint32(18).string(message.body); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CustomCode { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCustomCode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.type = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.body = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CustomCode { - return { - type: isSet(object.type) ? customCodeTypeFromJSON(object.type) : 0, - body: isSet(object.body) ? globalThis.String(object.body) : "", - }; - }, - - toJSON(message: CustomCode): unknown { - const obj: any = {}; - if (message.type !== 0) { - obj.type = customCodeTypeToJSON(message.type); - } - if (message.body !== "") { - obj.body = message.body; - } - return obj; - }, - - create, I>>(base?: I): CustomCode { - return CustomCode.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CustomCode { - const message = createBaseCustomCode(); - message.type = object.type ?? 0; - message.body = object.body ?? ""; - return message; - }, -}; - -function createBaseConditionJump(): ConditionJump { - return { expression: "", next: "" }; -} - -export const ConditionJump: MessageFns = { - encode(message: ConditionJump, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.expression !== "") { - writer.uint32(10).string(message.expression); - } - if (message.next !== "") { - writer.uint32(18).string(message.next); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ConditionJump { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConditionJump(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.expression = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.next = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ConditionJump { - return { - expression: isSet(object.expression) ? globalThis.String(object.expression) : "", - next: isSet(object.next) ? globalThis.String(object.next) : "", - }; - }, - - toJSON(message: ConditionJump): unknown { - const obj: any = {}; - if (message.expression !== "") { - obj.expression = message.expression; - } - if (message.next !== "") { - obj.next = message.next; - } - return obj; - }, - - create, I>>(base?: I): ConditionJump { - return ConditionJump.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ConditionJump { - const message = createBaseConditionJump(); - message.expression = object.expression ?? ""; - message.next = object.next ?? ""; - return message; - }, -}; - -function createBaseBranchAction(): BranchAction { - return { If: undefined, ElseIfs: [], Else: undefined }; -} - -export const BranchAction: MessageFns = { - encode(message: BranchAction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.If !== undefined) { - ConditionJump.encode(message.If, writer.uint32(10).fork()).join(); - } - for (const v of message.ElseIfs) { - ConditionJump.encode(v!, writer.uint32(18).fork()).join(); - } - if (message.Else !== undefined) { - ConditionJump.encode(message.Else, writer.uint32(26).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BranchAction { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBranchAction(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.If = ConditionJump.decode(reader, reader.uint32()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.ElseIfs.push(ConditionJump.decode(reader, reader.uint32())); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.Else = ConditionJump.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): BranchAction { - return { - If: isSet(object.If) ? ConditionJump.fromJSON(object.If) : undefined, - ElseIfs: globalThis.Array.isArray(object?.ElseIfs) - ? object.ElseIfs.map((e: any) => ConditionJump.fromJSON(e)) - : [], - Else: isSet(object.Else) ? ConditionJump.fromJSON(object.Else) : undefined, - }; - }, - - toJSON(message: BranchAction): unknown { - const obj: any = {}; - if (message.If !== undefined) { - obj.If = ConditionJump.toJSON(message.If); - } - if (message.ElseIfs?.length) { - obj.ElseIfs = message.ElseIfs.map((e) => ConditionJump.toJSON(e)); - } - if (message.Else !== undefined) { - obj.Else = ConditionJump.toJSON(message.Else); - } - return obj; - }, - - create, I>>(base?: I): BranchAction { - return BranchAction.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): BranchAction { - const message = createBaseBranchAction(); - message.If = (object.If !== undefined && object.If !== null) ? ConditionJump.fromPartial(object.If) : undefined; - message.ElseIfs = object.ElseIfs?.map((e) => ConditionJump.fromPartial(e)) || []; - message.Else = (object.Else !== undefined && object.Else !== null) - ? ConditionJump.fromPartial(object.Else) - : undefined; - return message; - }, -}; - -function createBaseTaskAction(): TaskAction { - return { - taskType: 0, - id: "", - name: "", - next: [], - ethTransfer: undefined, - contractExecution: undefined, - graphqlDataQuery: undefined, - httpDataQuery: undefined, - customCode: undefined, - branch: undefined, - }; -} - -export const TaskAction: MessageFns = { - encode(message: TaskAction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.taskType !== 0) { - writer.uint32(8).int32(message.taskType); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.name !== "") { - writer.uint32(26).string(message.name); - } - for (const v of message.next) { - writer.uint32(34).string(v!); - } - if (message.ethTransfer !== undefined) { - ETHTransfer.encode(message.ethTransfer, writer.uint32(82).fork()).join(); - } - if (message.contractExecution !== undefined) { - ContractExecution.encode(message.contractExecution, writer.uint32(90).fork()).join(); - } - if (message.graphqlDataQuery !== undefined) { - GraphQLDataQuery.encode(message.graphqlDataQuery, writer.uint32(98).fork()).join(); - } - if (message.httpDataQuery !== undefined) { - HTTPAPICall.encode(message.httpDataQuery, writer.uint32(106).fork()).join(); - } - if (message.customCode !== undefined) { - CustomCode.encode(message.customCode, writer.uint32(114).fork()).join(); - } - if (message.branch !== undefined) { - BranchAction.encode(message.branch, writer.uint32(122).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskAction { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTaskAction(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.taskType = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.name = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.next.push(reader.string()); - continue; - } - case 10: { - if (tag !== 82) { - break; - } - - message.ethTransfer = ETHTransfer.decode(reader, reader.uint32()); - continue; - } - case 11: { - if (tag !== 90) { - break; - } - - message.contractExecution = ContractExecution.decode(reader, reader.uint32()); - continue; - } - case 12: { - if (tag !== 98) { - break; - } - - message.graphqlDataQuery = GraphQLDataQuery.decode(reader, reader.uint32()); - continue; - } - case 13: { - if (tag !== 106) { - break; - } - - message.httpDataQuery = HTTPAPICall.decode(reader, reader.uint32()); - continue; - } - case 14: { - if (tag !== 114) { - break; - } - - message.customCode = CustomCode.decode(reader, reader.uint32()); - continue; - } - case 15: { - if (tag !== 122) { - break; - } - - message.branch = BranchAction.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): TaskAction { - return { - taskType: isSet(object.taskType) ? taskTypeFromJSON(object.taskType) : 0, - id: isSet(object.id) ? globalThis.String(object.id) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - next: globalThis.Array.isArray(object?.next) ? object.next.map((e: any) => globalThis.String(e)) : [], - ethTransfer: isSet(object.ethTransfer) ? ETHTransfer.fromJSON(object.ethTransfer) : undefined, - contractExecution: isSet(object.contractExecution) - ? ContractExecution.fromJSON(object.contractExecution) - : undefined, - graphqlDataQuery: isSet(object.graphqlDataQuery) ? GraphQLDataQuery.fromJSON(object.graphqlDataQuery) : undefined, - httpDataQuery: isSet(object.httpDataQuery) ? HTTPAPICall.fromJSON(object.httpDataQuery) : undefined, - customCode: isSet(object.customCode) ? CustomCode.fromJSON(object.customCode) : undefined, - branch: isSet(object.branch) ? BranchAction.fromJSON(object.branch) : undefined, - }; - }, - - toJSON(message: TaskAction): unknown { - const obj: any = {}; - if (message.taskType !== 0) { - obj.taskType = taskTypeToJSON(message.taskType); - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.name !== "") { - obj.name = message.name; - } - if (message.next?.length) { - obj.next = message.next; - } - if (message.ethTransfer !== undefined) { - obj.ethTransfer = ETHTransfer.toJSON(message.ethTransfer); - } - if (message.contractExecution !== undefined) { - obj.contractExecution = ContractExecution.toJSON(message.contractExecution); - } - if (message.graphqlDataQuery !== undefined) { - obj.graphqlDataQuery = GraphQLDataQuery.toJSON(message.graphqlDataQuery); - } - if (message.httpDataQuery !== undefined) { - obj.httpDataQuery = HTTPAPICall.toJSON(message.httpDataQuery); - } - if (message.customCode !== undefined) { - obj.customCode = CustomCode.toJSON(message.customCode); - } - if (message.branch !== undefined) { - obj.branch = BranchAction.toJSON(message.branch); - } - return obj; - }, - - create, I>>(base?: I): TaskAction { - return TaskAction.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): TaskAction { - const message = createBaseTaskAction(); - message.taskType = object.taskType ?? 0; - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.next = object.next?.map((e) => e) || []; - message.ethTransfer = (object.ethTransfer !== undefined && object.ethTransfer !== null) - ? ETHTransfer.fromPartial(object.ethTransfer) - : undefined; - message.contractExecution = (object.contractExecution !== undefined && object.contractExecution !== null) - ? ContractExecution.fromPartial(object.contractExecution) - : undefined; - message.graphqlDataQuery = (object.graphqlDataQuery !== undefined && object.graphqlDataQuery !== null) - ? GraphQLDataQuery.fromPartial(object.graphqlDataQuery) - : undefined; - message.httpDataQuery = (object.httpDataQuery !== undefined && object.httpDataQuery !== null) - ? HTTPAPICall.fromPartial(object.httpDataQuery) - : undefined; - message.customCode = (object.customCode !== undefined && object.customCode !== null) - ? CustomCode.fromPartial(object.customCode) - : undefined; - message.branch = (object.branch !== undefined && object.branch !== null) - ? BranchAction.fromPartial(object.branch) - : undefined; - return message; - }, -}; - -function createBaseExecution(): Execution { - return { epoch: 0, userOpHash: "", error: "" }; -} - -export const Execution: MessageFns = { - encode(message: Execution, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.epoch !== 0) { - writer.uint32(8).int64(message.epoch); - } - if (message.userOpHash !== "") { - writer.uint32(18).string(message.userOpHash); - } - if (message.error !== "") { - writer.uint32(26).string(message.error); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Execution { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExecution(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.epoch = longToNumber(reader.int64()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.userOpHash = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.error = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Execution { - return { - epoch: isSet(object.epoch) ? globalThis.Number(object.epoch) : 0, - userOpHash: isSet(object.userOpHash) ? globalThis.String(object.userOpHash) : "", - error: isSet(object.error) ? globalThis.String(object.error) : "", - }; - }, - - toJSON(message: Execution): unknown { - const obj: any = {}; - if (message.epoch !== 0) { - obj.epoch = Math.round(message.epoch); - } - if (message.userOpHash !== "") { - obj.userOpHash = message.userOpHash; - } - if (message.error !== "") { - obj.error = message.error; - } - return obj; - }, - - create, I>>(base?: I): Execution { - return Execution.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Execution { - const message = createBaseExecution(); - message.epoch = object.epoch ?? 0; - message.userOpHash = object.userOpHash ?? ""; - message.error = object.error ?? ""; - return message; - }, -}; - -function createBaseTask(): Task { - return { - id: undefined, - owner: "", - smartAccountAddress: "", - trigger: undefined, - nodes: [], - startAt: 0, - expiredAt: 0, - memo: "", - completedAt: 0, - status: 0, - repeatable: false, - executions: [], - }; -} - -export const Task: MessageFns = { - encode(message: Task, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== undefined) { - UUID.encode(message.id, writer.uint32(10).fork()).join(); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - if (message.smartAccountAddress !== "") { - writer.uint32(26).string(message.smartAccountAddress); - } - if (message.trigger !== undefined) { - TaskTrigger.encode(message.trigger, writer.uint32(34).fork()).join(); - } - for (const v of message.nodes) { - TaskAction.encode(v!, writer.uint32(42).fork()).join(); - } - if (message.startAt !== 0) { - writer.uint32(48).int64(message.startAt); - } - if (message.expiredAt !== 0) { - writer.uint32(56).int64(message.expiredAt); - } - if (message.memo !== "") { - writer.uint32(66).string(message.memo); - } - if (message.completedAt !== 0) { - writer.uint32(72).int64(message.completedAt); - } - if (message.status !== 0) { - writer.uint32(80).int32(message.status); - } - if (message.repeatable !== false) { - writer.uint32(88).bool(message.repeatable); - } - for (const v of message.executions) { - Execution.encode(v!, writer.uint32(98).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Task { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTask(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = UUID.decode(reader, reader.uint32()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.owner = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.smartAccountAddress = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.trigger = TaskTrigger.decode(reader, reader.uint32()); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.nodes.push(TaskAction.decode(reader, reader.uint32())); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.startAt = longToNumber(reader.int64()); - continue; - } - case 7: { - if (tag !== 56) { - break; - } - - message.expiredAt = longToNumber(reader.int64()); - continue; - } - case 8: { - if (tag !== 66) { - break; - } - - message.memo = reader.string(); - continue; - } - case 9: { - if (tag !== 72) { - break; - } - - message.completedAt = longToNumber(reader.int64()); - continue; - } - case 10: { - if (tag !== 80) { - break; - } - - message.status = reader.int32() as any; - continue; - } - case 11: { - if (tag !== 88) { - break; - } - - message.repeatable = reader.bool(); - continue; - } - case 12: { - if (tag !== 98) { - break; - } - - message.executions.push(Execution.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Task { - return { - id: isSet(object.id) ? UUID.fromJSON(object.id) : undefined, - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - smartAccountAddress: isSet(object.smartAccountAddress) ? globalThis.String(object.smartAccountAddress) : "", - trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined, - nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => TaskAction.fromJSON(e)) : [], - startAt: isSet(object.startAt) ? globalThis.Number(object.startAt) : 0, - expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0, - memo: isSet(object.memo) ? globalThis.String(object.memo) : "", - completedAt: isSet(object.completedAt) ? globalThis.Number(object.completedAt) : 0, - status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0, - repeatable: isSet(object.repeatable) ? globalThis.Boolean(object.repeatable) : false, - executions: globalThis.Array.isArray(object?.executions) - ? object.executions.map((e: any) => Execution.fromJSON(e)) - : [], - }; - }, - - toJSON(message: Task): unknown { - const obj: any = {}; - if (message.id !== undefined) { - obj.id = UUID.toJSON(message.id); - } - if (message.owner !== "") { - obj.owner = message.owner; - } - if (message.smartAccountAddress !== "") { - obj.smartAccountAddress = message.smartAccountAddress; - } - if (message.trigger !== undefined) { - obj.trigger = TaskTrigger.toJSON(message.trigger); - } - if (message.nodes?.length) { - obj.nodes = message.nodes.map((e) => TaskAction.toJSON(e)); - } - if (message.startAt !== 0) { - obj.startAt = Math.round(message.startAt); - } - if (message.expiredAt !== 0) { - obj.expiredAt = Math.round(message.expiredAt); - } - if (message.memo !== "") { - obj.memo = message.memo; - } - if (message.completedAt !== 0) { - obj.completedAt = Math.round(message.completedAt); - } - if (message.status !== 0) { - obj.status = taskStatusToJSON(message.status); - } - if (message.repeatable !== false) { - obj.repeatable = message.repeatable; - } - if (message.executions?.length) { - obj.executions = message.executions.map((e) => Execution.toJSON(e)); - } - return obj; - }, - - create, I>>(base?: I): Task { - return Task.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Task { - const message = createBaseTask(); - message.id = (object.id !== undefined && object.id !== null) ? UUID.fromPartial(object.id) : undefined; - message.owner = object.owner ?? ""; - message.smartAccountAddress = object.smartAccountAddress ?? ""; - message.trigger = (object.trigger !== undefined && object.trigger !== null) - ? TaskTrigger.fromPartial(object.trigger) - : undefined; - message.nodes = object.nodes?.map((e) => TaskAction.fromPartial(e)) || []; - message.startAt = object.startAt ?? 0; - message.expiredAt = object.expiredAt ?? 0; - message.memo = object.memo ?? ""; - message.completedAt = object.completedAt ?? 0; - message.status = object.status ?? 0; - message.repeatable = object.repeatable ?? false; - message.executions = object.executions?.map((e) => Execution.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateTaskReq(): CreateTaskReq { - return { trigger: undefined, actions: [], startAt: 0, expiredAt: 0, memo: "", repeatable: false }; -} - -export const CreateTaskReq: MessageFns = { - encode(message: CreateTaskReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.trigger !== undefined) { - TaskTrigger.encode(message.trigger, writer.uint32(10).fork()).join(); - } - for (const v of message.actions) { - TaskAction.encode(v!, writer.uint32(18).fork()).join(); - } - if (message.startAt !== 0) { - writer.uint32(24).int64(message.startAt); - } - if (message.expiredAt !== 0) { - writer.uint32(32).int64(message.expiredAt); - } - if (message.memo !== "") { - writer.uint32(42).string(message.memo); - } - if (message.repeatable !== false) { - writer.uint32(48).bool(message.repeatable); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CreateTaskReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateTaskReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.trigger = TaskTrigger.decode(reader, reader.uint32()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.actions.push(TaskAction.decode(reader, reader.uint32())); - continue; - } - case 3: { - if (tag !== 24) { - break; - } - - message.startAt = longToNumber(reader.int64()); - continue; - } - case 4: { - if (tag !== 32) { - break; - } - - message.expiredAt = longToNumber(reader.int64()); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.memo = reader.string(); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.repeatable = reader.bool(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateTaskReq { - return { - trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined, - actions: globalThis.Array.isArray(object?.actions) ? object.actions.map((e: any) => TaskAction.fromJSON(e)) : [], - startAt: isSet(object.startAt) ? globalThis.Number(object.startAt) : 0, - expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0, - memo: isSet(object.memo) ? globalThis.String(object.memo) : "", - repeatable: isSet(object.repeatable) ? globalThis.Boolean(object.repeatable) : false, - }; - }, - - toJSON(message: CreateTaskReq): unknown { - const obj: any = {}; - if (message.trigger !== undefined) { - obj.trigger = TaskTrigger.toJSON(message.trigger); - } - if (message.actions?.length) { - obj.actions = message.actions.map((e) => TaskAction.toJSON(e)); - } - if (message.startAt !== 0) { - obj.startAt = Math.round(message.startAt); - } - if (message.expiredAt !== 0) { - obj.expiredAt = Math.round(message.expiredAt); - } - if (message.memo !== "") { - obj.memo = message.memo; - } - if (message.repeatable !== false) { - obj.repeatable = message.repeatable; - } - return obj; - }, - - create, I>>(base?: I): CreateTaskReq { - return CreateTaskReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CreateTaskReq { - const message = createBaseCreateTaskReq(); - message.trigger = (object.trigger !== undefined && object.trigger !== null) - ? TaskTrigger.fromPartial(object.trigger) - : undefined; - message.actions = object.actions?.map((e) => TaskAction.fromPartial(e)) || []; - message.startAt = object.startAt ?? 0; - message.expiredAt = object.expiredAt ?? 0; - message.memo = object.memo ?? ""; - message.repeatable = object.repeatable ?? false; - return message; - }, -}; - -function createBaseCreateTaskResp(): CreateTaskResp { - return { id: "" }; -} - -export const CreateTaskResp: MessageFns = { - encode(message: CreateTaskResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CreateTaskResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateTaskResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateTaskResp { - return { id: isSet(object.id) ? globalThis.String(object.id) : "" }; - }, - - toJSON(message: CreateTaskResp): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - return obj; - }, - - create, I>>(base?: I): CreateTaskResp { - return CreateTaskResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CreateTaskResp { - const message = createBaseCreateTaskResp(); - message.id = object.id ?? ""; - return message; - }, -}; - -function createBaseNonceRequest(): NonceRequest { - return { owner: "" }; -} - -export const NonceRequest: MessageFns = { - encode(message: NonceRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): NonceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNonceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): NonceRequest { - return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; - }, - - toJSON(message: NonceRequest): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create, I>>(base?: I): NonceRequest { - return NonceRequest.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): NonceRequest { - const message = createBaseNonceRequest(); - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseNonceResp(): NonceResp { - return { nonce: "" }; -} - -export const NonceResp: MessageFns = { - encode(message: NonceResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.nonce !== "") { - writer.uint32(10).string(message.nonce); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): NonceResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNonceResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.nonce = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): NonceResp { - return { nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "" }; - }, - - toJSON(message: NonceResp): unknown { - const obj: any = {}; - if (message.nonce !== "") { - obj.nonce = message.nonce; - } - return obj; - }, - - create, I>>(base?: I): NonceResp { - return NonceResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): NonceResp { - const message = createBaseNonceResp(); - message.nonce = object.nonce ?? ""; - return message; - }, -}; - -function createBaseAddressRequest(): AddressRequest { - return { owner: "" }; -} - -export const AddressRequest: MessageFns = { - encode(message: AddressRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AddressRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddressRequest { - return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; - }, - - toJSON(message: AddressRequest): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create, I>>(base?: I): AddressRequest { - return AddressRequest.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): AddressRequest { - const message = createBaseAddressRequest(); - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseAddressResp(): AddressResp { - return { smartAccountAddress: "", nonce: "" }; -} - -export const AddressResp: MessageFns = { - encode(message: AddressResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.smartAccountAddress !== "") { - writer.uint32(10).string(message.smartAccountAddress); - } - if (message.nonce !== "") { - writer.uint32(18).string(message.nonce); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AddressResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.smartAccountAddress = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.nonce = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddressResp { - return { - smartAccountAddress: isSet(object.smartAccountAddress) ? globalThis.String(object.smartAccountAddress) : "", - nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "", - }; - }, - - toJSON(message: AddressResp): unknown { - const obj: any = {}; - if (message.smartAccountAddress !== "") { - obj.smartAccountAddress = message.smartAccountAddress; - } - if (message.nonce !== "") { - obj.nonce = message.nonce; - } - return obj; - }, - - create, I>>(base?: I): AddressResp { - return AddressResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): AddressResp { - const message = createBaseAddressResp(); - message.smartAccountAddress = object.smartAccountAddress ?? ""; - message.nonce = object.nonce ?? ""; - return message; - }, -}; - -function createBaseListTasksReq(): ListTasksReq { - return {}; -} - -export const ListTasksReq: MessageFns = { - encode(_: ListTasksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ListTasksReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListTasksReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(_: any): ListTasksReq { - return {}; - }, - - toJSON(_: ListTasksReq): unknown { - const obj: any = {}; - return obj; - }, - - create, I>>(base?: I): ListTasksReq { - return ListTasksReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(_: I): ListTasksReq { - const message = createBaseListTasksReq(); - return message; - }, -}; - -function createBaseListTasksResp(): ListTasksResp { - return { tasks: [] }; -} - -export const ListTasksResp: MessageFns = { - encode(message: ListTasksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.tasks) { - ListTasksResp_TaskItemResp.encode(v!, writer.uint32(10).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ListTasksResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListTasksResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.tasks.push(ListTasksResp_TaskItemResp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListTasksResp { - return { - tasks: globalThis.Array.isArray(object?.tasks) - ? object.tasks.map((e: any) => ListTasksResp_TaskItemResp.fromJSON(e)) - : [], - }; - }, - - toJSON(message: ListTasksResp): unknown { - const obj: any = {}; - if (message.tasks?.length) { - obj.tasks = message.tasks.map((e) => ListTasksResp_TaskItemResp.toJSON(e)); - } - return obj; - }, - - create, I>>(base?: I): ListTasksResp { - return ListTasksResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ListTasksResp { - const message = createBaseListTasksResp(); - message.tasks = object.tasks?.map((e) => ListTasksResp_TaskItemResp.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseListTasksResp_TaskItemResp(): ListTasksResp_TaskItemResp { - return { id: "", status: 0 }; -} - -export const ListTasksResp_TaskItemResp: MessageFns = { - encode(message: ListTasksResp_TaskItemResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.status !== 0) { - writer.uint32(16).int32(message.status); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ListTasksResp_TaskItemResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListTasksResp_TaskItemResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 16) { - break; - } - - message.status = reader.int32() as any; - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListTasksResp_TaskItemResp { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0, - }; - }, - - toJSON(message: ListTasksResp_TaskItemResp): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.status !== 0) { - obj.status = taskStatusToJSON(message.status); - } - return obj; - }, - - create, I>>(base?: I): ListTasksResp_TaskItemResp { - return ListTasksResp_TaskItemResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ListTasksResp_TaskItemResp { - const message = createBaseListTasksResp_TaskItemResp(); - message.id = object.id ?? ""; - message.status = object.status ?? 0; - return message; - }, -}; - -function createBaseGetKeyReq(): GetKeyReq { - return { owner: "", expiredAt: 0, signature: "" }; -} - -export const GetKeyReq: MessageFns = { - encode(message: GetKeyReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.expiredAt !== 0) { - writer.uint32(16).int64(message.expiredAt); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GetKeyReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetKeyReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - case 2: { - if (tag !== 16) { - break; - } - - message.expiredAt = longToNumber(reader.int64()); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.signature = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetKeyReq { - return { - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0, - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - }; - }, - - toJSON(message: GetKeyReq): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - if (message.expiredAt !== 0) { - obj.expiredAt = Math.round(message.expiredAt); - } - if (message.signature !== "") { - obj.signature = message.signature; - } - return obj; - }, - - create, I>>(base?: I): GetKeyReq { - return GetKeyReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): GetKeyReq { - const message = createBaseGetKeyReq(); - message.owner = object.owner ?? ""; - message.expiredAt = object.expiredAt ?? 0; - message.signature = object.signature ?? ""; - return message; - }, -}; - -function createBaseKeyResp(): KeyResp { - return { key: "" }; -} - -export const KeyResp: MessageFns = { - encode(message: KeyResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): KeyResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseKeyResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): KeyResp { - return { key: isSet(object.key) ? globalThis.String(object.key) : "" }; - }, - - toJSON(message: KeyResp): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - return obj; - }, - - create, I>>(base?: I): KeyResp { - return KeyResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): KeyResp { - const message = createBaseKeyResp(); - message.key = object.key ?? ""; - return message; - }, -}; - -function createBaseUpdateChecksReq(): UpdateChecksReq { - return { address: "", signature: "", id: [] }; -} - -export const UpdateChecksReq: MessageFns = { - encode(message: UpdateChecksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.signature !== "") { - writer.uint32(18).string(message.signature); - } - for (const v of message.id) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateChecksReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChecksReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.signature = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.id.push(reader.string()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateChecksReq { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - id: globalThis.Array.isArray(object?.id) ? object.id.map((e: any) => globalThis.String(e)) : [], - }; - }, - - toJSON(message: UpdateChecksReq): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.signature !== "") { - obj.signature = message.signature; - } - if (message.id?.length) { - obj.id = message.id; - } - return obj; - }, - - create, I>>(base?: I): UpdateChecksReq { - return UpdateChecksReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): UpdateChecksReq { - const message = createBaseUpdateChecksReq(); - message.address = object.address ?? ""; - message.signature = object.signature ?? ""; - message.id = object.id?.map((e) => e) || []; - return message; - }, -}; - -function createBaseUpdateChecksResp(): UpdateChecksResp { - return { updatedAt: undefined }; -} - -export const UpdateChecksResp: MessageFns = { - encode(message: UpdateChecksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.updatedAt !== undefined) { - Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(10).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateChecksResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChecksResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateChecksResp { - return { updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined }; - }, - - toJSON(message: UpdateChecksResp): unknown { - const obj: any = {}; - if (message.updatedAt !== undefined) { - obj.updatedAt = message.updatedAt.toISOString(); - } - return obj; - }, - - create, I>>(base?: I): UpdateChecksResp { - return UpdateChecksResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): UpdateChecksResp { - const message = createBaseUpdateChecksResp(); - message.updatedAt = object.updatedAt ?? undefined; - return message; - }, -}; - -export interface Aggregator { - /** Auth */ - GetKey(request: GetKeyReq): Promise; - /** Smart Acccount */ - GetNonce(request: NonceRequest): Promise; - GetSmartAccountAddress(request: AddressRequest): Promise; - /** Task Management */ - CreateTask(request: CreateTaskReq): Promise; - ListTasks(request: ListTasksReq): Promise; - GetTask(request: UUID): Promise; - CancelTask(request: UUID): Promise; - DeleteTask(request: UUID): Promise; - /** Operator endpoint */ - Ping(request: Checkin): Promise; - SyncTasks(request: SyncTasksReq): Observable; - UpdateChecks(request: UpdateChecksReq): Promise; -} - -export const AggregatorServiceName = "aggregator.Aggregator"; -export class AggregatorClientImpl implements Aggregator { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || AggregatorServiceName; - this.rpc = rpc; - this.GetKey = this.GetKey.bind(this); - this.GetNonce = this.GetNonce.bind(this); - this.GetSmartAccountAddress = this.GetSmartAccountAddress.bind(this); - this.CreateTask = this.CreateTask.bind(this); - this.ListTasks = this.ListTasks.bind(this); - this.GetTask = this.GetTask.bind(this); - this.CancelTask = this.CancelTask.bind(this); - this.DeleteTask = this.DeleteTask.bind(this); - this.Ping = this.Ping.bind(this); - this.SyncTasks = this.SyncTasks.bind(this); - this.UpdateChecks = this.UpdateChecks.bind(this); - } - GetKey(request: GetKeyReq): Promise { - const data = GetKeyReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetKey", data); - return promise.then((data) => KeyResp.decode(new BinaryReader(data))); - } - - GetNonce(request: NonceRequest): Promise { - const data = NonceRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetNonce", data); - return promise.then((data) => NonceResp.decode(new BinaryReader(data))); - } - - GetSmartAccountAddress(request: AddressRequest): Promise { - const data = AddressRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetSmartAccountAddress", data); - return promise.then((data) => AddressResp.decode(new BinaryReader(data))); - } - - CreateTask(request: CreateTaskReq): Promise { - const data = CreateTaskReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "CreateTask", data); - return promise.then((data) => CreateTaskResp.decode(new BinaryReader(data))); - } - - ListTasks(request: ListTasksReq): Promise { - const data = ListTasksReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "ListTasks", data); - return promise.then((data) => ListTasksResp.decode(new BinaryReader(data))); - } - - GetTask(request: UUID): Promise { - const data = UUID.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetTask", data); - return promise.then((data) => Task.decode(new BinaryReader(data))); - } - - CancelTask(request: UUID): Promise { - const data = UUID.encode(request).finish(); - const promise = this.rpc.request(this.service, "CancelTask", data); - return promise.then((data) => BoolValue.decode(new BinaryReader(data))); - } - - DeleteTask(request: UUID): Promise { - const data = UUID.encode(request).finish(); - const promise = this.rpc.request(this.service, "DeleteTask", data); - return promise.then((data) => BoolValue.decode(new BinaryReader(data))); - } - - Ping(request: Checkin): Promise { - const data = Checkin.encode(request).finish(); - const promise = this.rpc.request(this.service, "Ping", data); - return promise.then((data) => CheckinResp.decode(new BinaryReader(data))); - } - - SyncTasks(request: SyncTasksReq): Observable { - const data = SyncTasksReq.encode(request).finish(); - const result = this.rpc.serverStreamingRequest(this.service, "SyncTasks", data); - return result.pipe(map((data) => SyncTasksResp.decode(new BinaryReader(data)))); - } - - UpdateChecks(request: UpdateChecksReq): Promise { - const data = UpdateChecksReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateChecks", data); - return promise.then((data) => UpdateChecksResp.decode(new BinaryReader(data))); - } -} - -export interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; - clientStreamingRequest(service: string, method: string, data: Observable): Promise; - serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; - bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = Math.trunc(date.getTime() / 1_000); - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = (t.seconds || 0) * 1_000; - millis += (t.nanos || 0) / 1_000_000; - return new globalThis.Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof globalThis.Date) { - return o; - } else if (typeof o === "string") { - return new globalThis.Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()); - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER"); - } - return num; -} - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter; - decode(input: BinaryReader | Uint8Array, length?: number): T; - fromJSON(object: any): T; - toJSON(message: T): unknown; - create, I>>(base?: I): T; - fromPartial, I>>(object: I): T; -} diff --git a/grpc_codegen/avs_grpc_pb.d.ts b/grpc_codegen/avs_grpc_pb.d.ts index f4a9c9c..3a80135 100644 --- a/grpc_codegen/avs_grpc_pb.d.ts +++ b/grpc_codegen/avs_grpc_pb.d.ts @@ -9,657 +9,220 @@ import * as avs_pb from "./avs_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; -interface IAggregatorService - extends grpc.ServiceDefinition { - getKey: IAggregatorService_IGetKey; - getNonce: IAggregatorService_IGetNonce; - getSmartAccountAddress: IAggregatorService_IGetSmartAccountAddress; - createTask: IAggregatorService_ICreateTask; - listTasks: IAggregatorService_IListTasks; - getTask: IAggregatorService_IGetTask; - cancelTask: IAggregatorService_ICancelTask; - deleteTask: IAggregatorService_IDeleteTask; - ping: IAggregatorService_IPing; - syncTasks: IAggregatorService_ISyncTasks; - updateChecks: IAggregatorService_IUpdateChecks; +interface IAggregatorService extends grpc.ServiceDefinition { + getKey: IAggregatorService_IGetKey; + getNonce: IAggregatorService_IGetNonce; + getSmartAccountAddress: IAggregatorService_IGetSmartAccountAddress; + createWallet: IAggregatorService_ICreateWallet; + createTask: IAggregatorService_ICreateTask; + listTasks: IAggregatorService_IListTasks; + getTask: IAggregatorService_IGetTask; + cancelTask: IAggregatorService_ICancelTask; + deleteTask: IAggregatorService_IDeleteTask; + ping: IAggregatorService_IPing; + syncTasks: IAggregatorService_ISyncTasks; + updateChecks: IAggregatorService_IUpdateChecks; } -interface IAggregatorService_IGetKey - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetKey"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetKey extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetKey"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetNonce - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetNonce"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetNonce extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetNonce"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetSmartAccountAddress - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetSmartAccountAddress"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetSmartAccountAddress extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetSmartAccountAddress"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ICreateTask - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/CreateTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ICreateWallet extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/CreateWallet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IListTasks - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/ListTasks"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ICreateTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/CreateTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetTask - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IListTasks extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/ListTasks"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ICancelTask - extends grpc.MethodDefinition< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - > { - path: "/aggregator.Aggregator/CancelTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IDeleteTask - extends grpc.MethodDefinition< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - > { - path: "/aggregator.Aggregator/DeleteTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ICancelTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/CancelTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IPing - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/Ping"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IDeleteTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/DeleteTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ISyncTasks - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/SyncTasks"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IPing extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/Ping"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IUpdateChecks - extends grpc.MethodDefinition< - avs_pb.UpdateChecksReq, - avs_pb.UpdateChecksResp - > { - path: "/aggregator.Aggregator/UpdateChecks"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ISyncTasks extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/SyncTasks"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } +interface IAggregatorService_IUpdateChecks extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/UpdateChecks"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const AggregatorService: IAggregatorService; export interface IAggregatorServer extends grpc.UntypedServiceImplementation { - getKey: grpc.handleUnaryCall; - getNonce: grpc.handleUnaryCall; - getSmartAccountAddress: grpc.handleUnaryCall< - avs_pb.AddressRequest, - avs_pb.AddressResp - >; - createTask: grpc.handleUnaryCall; - listTasks: grpc.handleUnaryCall; - getTask: grpc.handleUnaryCall; - cancelTask: grpc.handleUnaryCall< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - >; - deleteTask: grpc.handleUnaryCall< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - >; - ping: grpc.handleUnaryCall; - syncTasks: grpc.handleServerStreamingCall< - avs_pb.SyncTasksReq, - avs_pb.SyncTasksResp - >; - updateChecks: grpc.handleUnaryCall< - avs_pb.UpdateChecksReq, - avs_pb.UpdateChecksResp - >; + getKey: grpc.handleUnaryCall; + getNonce: grpc.handleUnaryCall; + getSmartAccountAddress: grpc.handleUnaryCall; + createWallet: grpc.handleUnaryCall; + createTask: grpc.handleUnaryCall; + listTasks: grpc.handleUnaryCall; + getTask: grpc.handleUnaryCall; + cancelTask: grpc.handleUnaryCall; + deleteTask: grpc.handleUnaryCall; + ping: grpc.handleUnaryCall; + syncTasks: grpc.handleServerStreamingCall; + updateChecks: grpc.handleUnaryCall; } export interface IAggregatorClient { - getKey( - request: avs_pb.GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: avs_pb.NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: avs_pb.AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: avs_pb.CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: avs_pb.ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: avs_pb.UUID, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: avs_pb.Checkin, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: avs_pb.SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: avs_pb.SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: avs_pb.UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + getKey(request: avs_pb.GetKeyReq, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: avs_pb.NonceRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + getSmartAccountAddress(request: avs_pb.AddressRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; + getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; + getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; + createWallet(request: avs_pb.CreateWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: avs_pb.CreateTaskReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: avs_pb.ListTasksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: avs_pb.Checkin, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: avs_pb.Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: avs_pb.Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: avs_pb.SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: avs_pb.SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: avs_pb.UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; } export class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: avs_pb.GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: avs_pb.NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: avs_pb.AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: avs_pb.CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: avs_pb.ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: avs_pb.UUID, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: avs_pb.Checkin, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: avs_pb.SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: avs_pb.SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: avs_pb.UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: avs_pb.GetKeyReq, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: avs_pb.NonceRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + public getSmartAccountAddress(request: avs_pb.AddressRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; + public getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; + public getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; + public createWallet(request: avs_pb.CreateWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: avs_pb.CreateTaskReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: avs_pb.ListTasksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: avs_pb.Checkin, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: avs_pb.Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: avs_pb.Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: avs_pb.SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: avs_pb.SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: avs_pb.UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; } diff --git a/grpc_codegen/avs_grpc_pb.js b/grpc_codegen/avs_grpc_pb.js index 004d689..ed3ab4b 100644 --- a/grpc_codegen/avs_grpc_pb.js +++ b/grpc_codegen/avs_grpc_pb.js @@ -72,6 +72,28 @@ function deserialize_aggregator_CreateTaskResp(buffer_arg) { return avs_pb.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb.CreateWalletReq)) { + throw new Error('Expected argument of type aggregator.CreateWalletReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb.CreateWalletResp)) { + throw new Error('Expected argument of type aggregator.CreateWalletResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_GetKeyReq(arg) { if (!(arg instanceof avs_pb.GetKeyReq)) { throw new Error('Expected argument of type aggregator.GetKeyReq'); @@ -216,7 +238,7 @@ function deserialize_google_protobuf_BoolValue(buffer_arg) { } -const AggregatorService = { +var AggregatorService = exports.AggregatorService = { // Auth getKey: { path: '/aggregator.Aggregator/GetKey', @@ -253,7 +275,18 @@ getNonce: { responseDeserialize: deserialize_aggregator_AddressResp, }, // Task Management -createTask: { +createWallet: { + path: '/aggregator.Aggregator/CreateWallet', + requestStream: false, + responseStream: false, + requestType: avs_pb.CreateWalletReq, + responseType: avs_pb.CreateWalletResp, + requestSerialize: serialize_aggregator_CreateWalletReq, + requestDeserialize: deserialize_aggregator_CreateWalletReq, + responseSerialize: serialize_aggregator_CreateWalletResp, + responseDeserialize: deserialize_aggregator_CreateWalletResp, + }, + createTask: { path: '/aggregator.Aggregator/CreateTask', requestStream: false, responseStream: false, @@ -344,6 +377,4 @@ ping: { }, }; -const AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); - -export { AggregatorService, AggregatorClient }; +exports.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); diff --git a/grpc_codegen/avs_pb.d.ts b/grpc_codegen/avs_pb.d.ts index 8fdb35f..a3c6e54 100644 --- a/grpc_codegen/avs_pb.d.ts +++ b/grpc_codegen/avs_pb.d.ts @@ -152,110 +152,150 @@ export namespace SyncTasksReq { } } -export class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; +export class FixedEpochCondition extends jspb.Message { + clearEpochesList(): void; + getEpochesList(): Array; + setEpochesList(value: Array): FixedEpochCondition; + addEpoches(value: number, index?: number): number; - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; +export namespace FixedEpochCondition { + export type AsObject = { + epochesList: Array, + } +} - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; +export class CronCondition extends jspb.Message { + clearCronTableList(): void; + getCronTableList(): Array; + setCronTableList(value: Array): CronCondition; + addCronTable(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; } -export namespace TaskTrigger { +export namespace CronCondition { export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, + cronTableList: Array, } } -export class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; +export class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; } -export namespace TimeCondition { +export namespace BlockCondition { export type AsObject = { - fixedList: Array, - cron: string, + interval: number, } } -export class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; +export class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; } -export namespace ContractQueryCondition { +export namespace EventCondition { export type AsObject = { - contractAddress: string, - callmsg: string, + expression: string, } } -export class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; +export class TaskTrigger extends jspb.Message { + getTriggerType(): TriggerType; + setTriggerType(value: TriggerType): TaskTrigger; + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger; + + hasAt(): boolean; + clearAt(): void; + getAt(): FixedEpochCondition | undefined; + setAt(value?: FixedEpochCondition): TaskTrigger; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger; + + getTriggerConditionCase(): TaskTrigger.TriggerConditionCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; + toObject(includeInstance?: boolean): TaskTrigger.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; + static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger; + static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; } -export namespace ExpressionCondition { +export namespace TaskTrigger { export type AsObject = { - expression: string, + triggerType: TriggerType, + manual: boolean, + at?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, } + + export enum TriggerConditionCase { + TRIGGER_CONDITION_NOT_SET = 0, + MANUAL = 2, + AT = 3, + CRON = 4, + BLOCK = 5, + EVENT = 6, + } + } export class SyncTasksResp extends jspb.Message { @@ -287,129 +327,155 @@ export namespace SyncTasksResp { } } -export class ETHTransfer extends jspb.Message { +export class ETHTransferNode extends jspb.Message { getDestination(): string; - setDestination(value: string): ETHTransfer; + setDestination(value: string): ETHTransferNode; getAmount(): string; - setAmount(value: string): ETHTransfer; + setAmount(value: string): ETHTransferNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; } -export namespace ETHTransfer { +export namespace ETHTransferNode { export type AsObject = { destination: string, amount: string, } } -export class ContractExecution extends jspb.Message { +export class ContractWriteNode extends jspb.Message { getContractAddress(): string; - setContractAddress(value: string): ContractExecution; + setContractAddress(value: string): ContractWriteNode; getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; } -export namespace ContractExecution { +export namespace ContractWriteNode { export type AsObject = { contractAddress: string, callData: string, - method: string, - encodedParams: string, + contractAbi: string, } } -export class GraphQLDataQuery extends jspb.Message { +export class ContractQueryNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractQueryNode; + getCallData(): string; + setCallData(value: string): ContractQueryNode; + getContractAbi(): string; + setContractAbi(value: string): ContractQueryNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractQueryNode): ContractQueryNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractQueryNode; + static deserializeBinaryFromReader(message: ContractQueryNode, reader: jspb.BinaryReader): ContractQueryNode; +} + +export namespace ContractQueryNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +export class GraphQLQueryNode extends jspb.Message { getUrl(): string; - setUrl(value: string): GraphQLDataQuery; + setUrl(value: string): GraphQLQueryNode; getQuery(): string; - setQuery(value: string): GraphQLDataQuery; + setQuery(value: string): GraphQLQueryNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; } -export namespace GraphQLDataQuery { +export namespace GraphQLQueryNode { export type AsObject = { url: string, query: string, } } -export class HTTPAPICall extends jspb.Message { +export class RestAPINode extends jspb.Message { getUrl(): string; - setUrl(value: string): HTTPAPICall; + setUrl(value: string): RestAPINode; getHeadersMap(): jspb.Map; clearHeadersMap(): void; getBody(): string; - setBody(value: string): HTTPAPICall; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; } -export namespace HTTPAPICall { +export namespace RestAPINode { export type AsObject = { url: string, headersMap: Array<[string, string]>, body: string, + method: string, } } -export class CustomCode extends jspb.Message { +export class CustomCodeNode extends jspb.Message { getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; } -export namespace CustomCode { +export namespace CustomCodeNode { export type AsObject = { type: CustomCodeType, - body: string, + source: string, } } @@ -436,33 +502,33 @@ export namespace ConditionJump { } } -export class BranchAction extends jspb.Message { +export class BranchNode extends jspb.Message { hasIf(): boolean; clearIf(): void; getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; + setIf(value?: ConditionJump): BranchNode; clearElseifsList(): void; getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; + setElseifsList(value: Array): BranchNode; addElseifs(value?: ConditionJump, index?: number): ConditionJump; hasElse(): boolean; clearElse(): void; getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; + setElse(value?: ConditionJump): BranchNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; } -export namespace BranchAction { +export namespace BranchNode { export type AsObject = { pb_if?: ConditionJump.AsObject, elseifsList: Array, @@ -470,71 +536,139 @@ export namespace BranchAction { } } -export class TaskAction extends jspb.Message { - getTaskType(): TaskType; - setTaskType(value: TaskType): TaskAction; +export class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; +} + +export namespace FilterNode { + export type AsObject = { + expression: string, + } +} + +export class TaskEdge extends jspb.Message { + getId(): string; + setId(value: string): TaskEdge; + getSource(): string; + setSource(value: string): TaskEdge; + getTarget(): string; + setTarget(value: string): TaskEdge; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge): TaskEdge.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge; + static deserializeBinaryFromReader(message: TaskEdge, reader: jspb.BinaryReader): TaskEdge; +} + +export namespace TaskEdge { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +export class TaskNode extends jspb.Message { + getNodeType(): TaskType; + setNodeType(value: TaskType): TaskNode; getId(): string; - setId(value: string): TaskAction; + setId(value: string): TaskNode; getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; + setName(value: string): TaskNode; hasEthTransfer(): boolean; clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode; - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode; + + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractQueryNode | undefined; + setContractRead(value?: ContractQueryNode): TaskNode; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode; - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode; hasCustomCode(): boolean; clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode; - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; + getTaskBodyCase(): TaskNode.TaskBodyCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; + toObject(includeInstance?: boolean): TaskNode.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode): TaskNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; + static serializeBinaryToWriter(message: TaskNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode; + static deserializeBinaryFromReader(message: TaskNode, reader: jspb.BinaryReader): TaskNode; } -export namespace TaskAction { +export namespace TaskNode { export type AsObject = { - taskType: TaskType, + nodeType: TaskType, id: string, name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractQueryNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + customCode?: CustomCodeNode.AsObject, } + + export enum TaskBodyCase { + TASK_BODY_NOT_SET = 0, + ETH_TRANSFER = 10, + CONTRACT_WRITE = 11, + CONTRACT_READ = 12, + GRAPHQL_DATA_QUERY = 13, + REST_API = 14, + BRANCH = 15, + FILTER = 16, + CUSTOM_CODE = 17, + } + } export class Execution extends jspb.Message { @@ -571,17 +705,8 @@ export class Task extends jspb.Message { setId(value?: UUID): Task; getOwner(): string; setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task; getStartAt(): number; setStartAt(value: number): Task; getExpiredAt(): number; @@ -590,10 +715,23 @@ export class Task extends jspb.Message { setMemo(value: string): Task; getCompletedAt(): number; setCompletedAt(value: number): Task; + getRecurring(): boolean; + setRecurring(value: boolean): Task; getStatus(): TaskStatus; setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger | undefined; + setTrigger(value?: TaskTrigger): Task; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task; + addEdges(value?: TaskEdge, index?: number): TaskEdge; clearExecutionsList(): void; getExecutionsList(): Array; setExecutionsList(value: Array): Task; @@ -613,15 +751,16 @@ export namespace Task { export type AsObject = { id?: UUID.AsObject, owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, + smartWalletAddress: string, startAt: number, expiredAt: number, memo: string, completedAt: number, + recurring: boolean, status: TaskStatus, - repeatable: boolean, + trigger?: TaskTrigger.AsObject, + nodesList: Array, + edgesList: Array, executionsList: Array, } } @@ -632,18 +771,24 @@ export class CreateTaskReq extends jspb.Message { clearTrigger(): void; getTrigger(): TaskTrigger | undefined; setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; getStartAt(): number; setStartAt(value: number): CreateTaskReq; getExpiredAt(): number; setExpiredAt(value: number): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; getRepeatable(): boolean; setRepeatable(value: boolean): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; + getMemo(): string; + setMemo(value: string): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge, index?: number): TaskEdge; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateTaskReq.AsObject; @@ -658,11 +803,13 @@ export class CreateTaskReq extends jspb.Message { export namespace CreateTaskReq { export type AsObject = { trigger?: TaskTrigger.AsObject, - actionsList: Array, startAt: number, expiredAt: number, - memo: string, repeatable: boolean, + smartWalletAddress: string, + memo: string, + nodesList: Array, + edgesList: Array, } } @@ -727,8 +874,10 @@ export namespace NonceResp { } export class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; + getFactory(): string; + setFactory(value: string): AddressRequest; + getSalt(): string; + setSalt(value: string): AddressRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AddressRequest.AsObject; @@ -742,15 +891,42 @@ export class AddressRequest extends jspb.Message { export namespace AddressRequest { export type AsObject = { - owner: string, + factory: string, + salt: string, + } +} + +export class SmartWallet extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet; + getSalt(): string; + setSalt(value: string): SmartWallet; + getFactory(): string; + setFactory(value: string): SmartWallet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SmartWallet.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet): SmartWallet.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SmartWallet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet; + static deserializeBinaryFromReader(message: SmartWallet, reader: jspb.BinaryReader): SmartWallet; +} + +export namespace SmartWallet { + export type AsObject = { + address: string, + salt: string, + factory: string, } } export class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): AddressResp; + addWallets(value?: SmartWallet, index?: number): SmartWallet; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): AddressResp.AsObject; @@ -764,12 +940,13 @@ export class AddressResp extends jspb.Message { export namespace AddressResp { export type AsObject = { - smartAccountAddress: string, - nonce: string, + walletsList: Array, } } export class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksReq.AsObject; @@ -783,14 +960,15 @@ export class ListTasksReq extends jspb.Message { export namespace ListTasksReq { export type AsObject = { + smartWalletAddress: string, } } export class ListTasksResp extends jspb.Message { clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task, index?: number): Task; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksResp.AsObject; @@ -804,33 +982,8 @@ export class ListTasksResp extends jspb.Message { export namespace ListTasksResp { export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } + tasksList: Array, } - } export class GetKeyReq extends jspb.Message { @@ -930,19 +1083,66 @@ export namespace UpdateChecksResp { } } +export class CreateWalletReq extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq): CreateWalletReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq; + static deserializeBinaryFromReader(message: CreateWalletReq, reader: jspb.BinaryReader): CreateWalletReq; +} + +export namespace CreateWalletReq { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +export class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; +} + +export namespace CreateWalletResp { + export type AsObject = { + address: string, + } +} + export enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, + MANUALTRIGGER = 0, + FIXEDEPOCHTRIGGER = 1, + CRONTRIGGER = 2, + BLOCKTRIGGER = 3, + EVENTTRIGGER = 4, } -export enum TaskType { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, +export enum Error { + UNKNOWERROR = 0, + RPCNODEERROR = 1000, + STORAGEUNAVAILABLE = 2000, + STORAGEWRITEERROR = 2001, + SMARTWALLETRPCERROR = 6000, + SMARTWALLETNOTFOUNDERROR = 6001, + TASKDATACORRUPTED = 7000, + TASKDATAMISSINGERROR = 7001, } export enum TaskStatus { @@ -955,4 +1155,15 @@ export enum TaskStatus { export enum CustomCodeType { JAVASCRIPT = 0, -} \ No newline at end of file +} + +export enum TaskType { + ETHTRANSFERTASK = 0, + CONTRACTWRITETASK = 1, + CONTRACTREADTASK = 2, + GRAPHQLDATAQUERYTASK = 3, + RESTAPITASK = 4, + BRANCHTASK = 5, + FILTERTASK = 6, + CUSTOMCODETASK = 7, +} diff --git a/grpc_codegen/avs_pb.js b/grpc_codegen/avs_pb.js index 4bb625f..d465414 100644 --- a/grpc_codegen/avs_pb.js +++ b/grpc_codegen/avs_pb.js @@ -11,65 +11,66 @@ /* eslint-disable */ // @ts-nocheck -var jspb = require("google-protobuf"); +var jspb = require('google-protobuf'); var goog = jspb; -var global = function () { - if (this) { - return this; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return Function("return this")(); -}.call(null); - -var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); -var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); +var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); -goog.exportSymbol("proto.aggregator.AddressRequest", null, global); -goog.exportSymbol("proto.aggregator.AddressResp", null, global); -goog.exportSymbol("proto.aggregator.BranchAction", null, global); -goog.exportSymbol("proto.aggregator.Checkin", null, global); -goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); -goog.exportSymbol("proto.aggregator.CheckinResp", null, global); -goog.exportSymbol("proto.aggregator.ConditionJump", null, global); -goog.exportSymbol("proto.aggregator.ContractExecution", null, global); -goog.exportSymbol("proto.aggregator.ContractQueryCondition", null, global); -goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); -goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); -goog.exportSymbol("proto.aggregator.CustomCode", null, global); -goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); -goog.exportSymbol("proto.aggregator.ETHTransfer", null, global); -goog.exportSymbol("proto.aggregator.Execution", null, global); -goog.exportSymbol("proto.aggregator.ExpressionCondition", null, global); -goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); -goog.exportSymbol("proto.aggregator.GraphQLDataQuery", null, global); -goog.exportSymbol("proto.aggregator.HTTPAPICall", null, global); -goog.exportSymbol("proto.aggregator.KeyResp", null, global); -goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); -goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); -goog.exportSymbol("proto.aggregator.ListTasksResp.TaskItemResp", null, global); -goog.exportSymbol("proto.aggregator.NonceRequest", null, global); -goog.exportSymbol("proto.aggregator.NonceResp", null, global); -goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); -goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); -goog.exportSymbol("proto.aggregator.Task", null, global); -goog.exportSymbol("proto.aggregator.TaskAction", null, global); -goog.exportSymbol("proto.aggregator.TaskStatus", null, global); -goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); -goog.exportSymbol("proto.aggregator.TaskType", null, global); -goog.exportSymbol("proto.aggregator.TimeCondition", null, global); -goog.exportSymbol("proto.aggregator.TriggerType", null, global); -goog.exportSymbol("proto.aggregator.UUID", null, global); -goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); -goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); +goog.exportSymbol('proto.aggregator.AddressRequest', null, global); +goog.exportSymbol('proto.aggregator.AddressResp', null, global); +goog.exportSymbol('proto.aggregator.BlockCondition', null, global); +goog.exportSymbol('proto.aggregator.BranchNode', null, global); +goog.exportSymbol('proto.aggregator.Checkin', null, global); +goog.exportSymbol('proto.aggregator.Checkin.Status', null, global); +goog.exportSymbol('proto.aggregator.CheckinResp', null, global); +goog.exportSymbol('proto.aggregator.ConditionJump', null, global); +goog.exportSymbol('proto.aggregator.ContractQueryNode', null, global); +goog.exportSymbol('proto.aggregator.ContractWriteNode', null, global); +goog.exportSymbol('proto.aggregator.CreateTaskReq', null, global); +goog.exportSymbol('proto.aggregator.CreateTaskResp', null, global); +goog.exportSymbol('proto.aggregator.CreateWalletReq', null, global); +goog.exportSymbol('proto.aggregator.CreateWalletResp', null, global); +goog.exportSymbol('proto.aggregator.CronCondition', null, global); +goog.exportSymbol('proto.aggregator.CustomCodeNode', null, global); +goog.exportSymbol('proto.aggregator.CustomCodeType', null, global); +goog.exportSymbol('proto.aggregator.ETHTransferNode', null, global); +goog.exportSymbol('proto.aggregator.Error', null, global); +goog.exportSymbol('proto.aggregator.EventCondition', null, global); +goog.exportSymbol('proto.aggregator.Execution', null, global); +goog.exportSymbol('proto.aggregator.FilterNode', null, global); +goog.exportSymbol('proto.aggregator.FixedEpochCondition', null, global); +goog.exportSymbol('proto.aggregator.GetKeyReq', null, global); +goog.exportSymbol('proto.aggregator.GraphQLQueryNode', null, global); +goog.exportSymbol('proto.aggregator.KeyResp', null, global); +goog.exportSymbol('proto.aggregator.ListTasksReq', null, global); +goog.exportSymbol('proto.aggregator.ListTasksResp', null, global); +goog.exportSymbol('proto.aggregator.NonceRequest', null, global); +goog.exportSymbol('proto.aggregator.NonceResp', null, global); +goog.exportSymbol('proto.aggregator.RestAPINode', null, global); +goog.exportSymbol('proto.aggregator.SmartWallet', null, global); +goog.exportSymbol('proto.aggregator.SyncTasksReq', null, global); +goog.exportSymbol('proto.aggregator.SyncTasksResp', null, global); +goog.exportSymbol('proto.aggregator.Task', null, global); +goog.exportSymbol('proto.aggregator.TaskEdge', null, global); +goog.exportSymbol('proto.aggregator.TaskNode', null, global); +goog.exportSymbol('proto.aggregator.TaskNode.TaskBodyCase', null, global); +goog.exportSymbol('proto.aggregator.TaskStatus', null, global); +goog.exportSymbol('proto.aggregator.TaskTrigger', null, global); +goog.exportSymbol('proto.aggregator.TaskTrigger.TriggerConditionCase', null, global); +goog.exportSymbol('proto.aggregator.TaskType', null, global); +goog.exportSymbol('proto.aggregator.TriggerType', null, global); +goog.exportSymbol('proto.aggregator.UUID', null, global); +goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); +goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -80,7 +81,7 @@ goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); * @extends {jspb.Message} * @constructor */ -proto.aggregator.UUID = function (opt_data) { +proto.aggregator.UUID = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.UUID, jspb.Message); @@ -89,7 +90,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; + proto.aggregator.UUID.displayName = 'proto.aggregator.UUID'; } /** * Generated by JsPbCodeGenerator. @@ -101,7 +102,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Checkin = function (opt_data) { +proto.aggregator.Checkin = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.Checkin, jspb.Message); @@ -110,7 +111,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; + proto.aggregator.Checkin.displayName = 'proto.aggregator.Checkin'; } /** * Generated by JsPbCodeGenerator. @@ -122,7 +123,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Checkin.Status = function (opt_data) { +proto.aggregator.Checkin.Status = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); @@ -131,8 +132,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Checkin.Status.displayName = - "proto.aggregator.Checkin.Status"; + proto.aggregator.Checkin.Status.displayName = 'proto.aggregator.Checkin.Status'; } /** * Generated by JsPbCodeGenerator. @@ -144,7 +144,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CheckinResp = function (opt_data) { +proto.aggregator.CheckinResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.CheckinResp, jspb.Message); @@ -153,7 +153,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; + proto.aggregator.CheckinResp.displayName = 'proto.aggregator.CheckinResp'; } /** * Generated by JsPbCodeGenerator. @@ -165,7 +165,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.SyncTasksReq = function (opt_data) { +proto.aggregator.SyncTasksReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); @@ -174,7 +174,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; + proto.aggregator.SyncTasksReq.displayName = 'proto.aggregator.SyncTasksReq'; } /** * Generated by JsPbCodeGenerator. @@ -186,16 +186,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TaskTrigger = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.aggregator.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); }; -goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); +goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + proto.aggregator.FixedEpochCondition.displayName = 'proto.aggregator.FixedEpochCondition'; } /** * Generated by JsPbCodeGenerator. @@ -207,23 +207,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TimeCondition = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TimeCondition.repeatedFields_, - null - ); -}; -goog.inherits(proto.aggregator.TimeCondition, jspb.Message); +proto.aggregator.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); +}; +goog.inherits(proto.aggregator.CronCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; + proto.aggregator.CronCondition.displayName = 'proto.aggregator.CronCondition'; } /** * Generated by JsPbCodeGenerator. @@ -235,17 +228,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractQueryCondition = function (opt_data) { +proto.aggregator.BlockCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); +goog.inherits(proto.aggregator.BlockCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractQueryCondition.displayName = - "proto.aggregator.ContractQueryCondition"; + proto.aggregator.BlockCondition.displayName = 'proto.aggregator.BlockCondition'; } /** * Generated by JsPbCodeGenerator. @@ -257,17 +249,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ExpressionCondition = function (opt_data) { +proto.aggregator.EventCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); +goog.inherits(proto.aggregator.EventCondition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.EventCondition.displayName = 'proto.aggregator.EventCondition'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.TaskTrigger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); +}; +goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ExpressionCondition.displayName = - "proto.aggregator.ExpressionCondition"; + proto.aggregator.TaskTrigger.displayName = 'proto.aggregator.TaskTrigger'; } /** * Generated by JsPbCodeGenerator. @@ -279,7 +291,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.SyncTasksResp = function (opt_data) { +proto.aggregator.SyncTasksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); @@ -288,7 +300,28 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; + proto.aggregator.SyncTasksResp.displayName = 'proto.aggregator.SyncTasksResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.ETHTransferNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.ETHTransferNode.displayName = 'proto.aggregator.ETHTransferNode'; } /** * Generated by JsPbCodeGenerator. @@ -300,16 +333,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ETHTransfer = function (opt_data) { +proto.aggregator.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); +goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; + proto.aggregator.ContractWriteNode.displayName = 'proto.aggregator.ContractWriteNode'; } /** * Generated by JsPbCodeGenerator. @@ -321,17 +354,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractExecution = function (opt_data) { +proto.aggregator.ContractQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractExecution, jspb.Message); +goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractExecution.displayName = - "proto.aggregator.ContractExecution"; + proto.aggregator.ContractQueryNode.displayName = 'proto.aggregator.ContractQueryNode'; } /** * Generated by JsPbCodeGenerator. @@ -343,17 +375,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.GraphQLDataQuery = function (opt_data) { +proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); +goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.GraphQLDataQuery.displayName = - "proto.aggregator.GraphQLDataQuery"; + proto.aggregator.GraphQLQueryNode.displayName = 'proto.aggregator.GraphQLQueryNode'; } /** * Generated by JsPbCodeGenerator. @@ -365,16 +396,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.HTTPAPICall = function (opt_data) { +proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); +goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; + proto.aggregator.RestAPINode.displayName = 'proto.aggregator.RestAPINode'; } /** * Generated by JsPbCodeGenerator. @@ -386,16 +417,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CustomCode = function (opt_data) { +proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.CustomCode, jspb.Message); +goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; + proto.aggregator.CustomCodeNode.displayName = 'proto.aggregator.CustomCodeNode'; } /** * Generated by JsPbCodeGenerator. @@ -407,7 +438,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ConditionJump = function (opt_data) { +proto.aggregator.ConditionJump = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.ConditionJump, jspb.Message); @@ -416,7 +447,49 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; + proto.aggregator.ConditionJump.displayName = 'proto.aggregator.ConditionJump'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.BranchNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); +}; +goog.inherits(proto.aggregator.BranchNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.BranchNode.displayName = 'proto.aggregator.BranchNode'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.FilterNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.FilterNode.displayName = 'proto.aggregator.FilterNode'; } /** * Generated by JsPbCodeGenerator. @@ -428,23 +501,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.BranchAction = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.BranchAction.repeatedFields_, - null - ); -}; -goog.inherits(proto.aggregator.BranchAction, jspb.Message); +proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.TaskEdge, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; + proto.aggregator.TaskEdge.displayName = 'proto.aggregator.TaskEdge'; } /** * Generated by JsPbCodeGenerator. @@ -456,23 +522,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TaskAction = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TaskAction.repeatedFields_, - null - ); -}; -goog.inherits(proto.aggregator.TaskAction, jspb.Message); +proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); +}; +goog.inherits(proto.aggregator.TaskNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; + proto.aggregator.TaskNode.displayName = 'proto.aggregator.TaskNode'; } /** * Generated by JsPbCodeGenerator. @@ -484,7 +543,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Execution = function (opt_data) { +proto.aggregator.Execution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.Execution, jspb.Message); @@ -493,7 +552,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; + proto.aggregator.Execution.displayName = 'proto.aggregator.Execution'; } /** * Generated by JsPbCodeGenerator. @@ -505,15 +564,8 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Task = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.Task.repeatedFields_, - null - ); +proto.aggregator.Task = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); }; goog.inherits(proto.aggregator.Task, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -521,7 +573,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Task.displayName = "proto.aggregator.Task"; + proto.aggregator.Task.displayName = 'proto.aggregator.Task'; } /** * Generated by JsPbCodeGenerator. @@ -533,15 +585,8 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CreateTaskReq = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.CreateTaskReq.repeatedFields_, - null - ); +proto.aggregator.CreateTaskReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -549,7 +594,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; + proto.aggregator.CreateTaskReq.displayName = 'proto.aggregator.CreateTaskReq'; } /** * Generated by JsPbCodeGenerator. @@ -561,7 +606,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CreateTaskResp = function (opt_data) { +proto.aggregator.CreateTaskResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); @@ -570,8 +615,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.CreateTaskResp.displayName = - "proto.aggregator.CreateTaskResp"; + proto.aggregator.CreateTaskResp.displayName = 'proto.aggregator.CreateTaskResp'; } /** * Generated by JsPbCodeGenerator. @@ -583,7 +627,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.NonceRequest = function (opt_data) { +proto.aggregator.NonceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.NonceRequest, jspb.Message); @@ -592,7 +636,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; + proto.aggregator.NonceRequest.displayName = 'proto.aggregator.NonceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -604,7 +648,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.NonceResp = function (opt_data) { +proto.aggregator.NonceResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.NonceResp, jspb.Message); @@ -613,7 +657,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; + proto.aggregator.NonceResp.displayName = 'proto.aggregator.NonceResp'; } /** * Generated by JsPbCodeGenerator. @@ -625,7 +669,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.AddressRequest = function (opt_data) { +proto.aggregator.AddressRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.AddressRequest, jspb.Message); @@ -634,8 +678,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.AddressRequest.displayName = - "proto.aggregator.AddressRequest"; + proto.aggregator.AddressRequest.displayName = 'proto.aggregator.AddressRequest'; } /** * Generated by JsPbCodeGenerator. @@ -647,16 +690,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.AddressResp = function (opt_data) { +proto.aggregator.SmartWallet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.AddressResp, jspb.Message); +goog.inherits(proto.aggregator.SmartWallet, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; + proto.aggregator.SmartWallet.displayName = 'proto.aggregator.SmartWallet'; } /** * Generated by JsPbCodeGenerator. @@ -668,16 +711,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ListTasksReq = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.aggregator.AddressResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); }; -goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); +goog.inherits(proto.aggregator.AddressResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; + proto.aggregator.AddressResp.displayName = 'proto.aggregator.AddressResp'; } /** * Generated by JsPbCodeGenerator. @@ -689,23 +732,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ListTasksResp = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.ListTasksResp.repeatedFields_, - null - ); +proto.aggregator.ListTasksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); +goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; + proto.aggregator.ListTasksReq.displayName = 'proto.aggregator.ListTasksReq'; } /** * Generated by JsPbCodeGenerator. @@ -717,17 +753,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ListTasksResp.TaskItemResp = function (opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.aggregator.ListTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); }; -goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); +goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksResp.TaskItemResp.displayName = - "proto.aggregator.ListTasksResp.TaskItemResp"; + proto.aggregator.ListTasksResp.displayName = 'proto.aggregator.ListTasksResp'; } /** * Generated by JsPbCodeGenerator. @@ -739,7 +774,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.GetKeyReq = function (opt_data) { +proto.aggregator.GetKeyReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); @@ -748,7 +783,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; + proto.aggregator.GetKeyReq.displayName = 'proto.aggregator.GetKeyReq'; } /** * Generated by JsPbCodeGenerator. @@ -760,7 +795,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.KeyResp = function (opt_data) { +proto.aggregator.KeyResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.KeyResp, jspb.Message); @@ -769,7 +804,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; + proto.aggregator.KeyResp.displayName = 'proto.aggregator.KeyResp'; } /** * Generated by JsPbCodeGenerator. @@ -781,15 +816,8 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.UpdateChecksReq = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.UpdateChecksReq.repeatedFields_, - null - ); +proto.aggregator.UpdateChecksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -797,8 +825,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.UpdateChecksReq.displayName = - "proto.aggregator.UpdateChecksReq"; + proto.aggregator.UpdateChecksReq.displayName = 'proto.aggregator.UpdateChecksReq'; } /** * Generated by JsPbCodeGenerator. @@ -810,7 +837,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.UpdateChecksResp = function (opt_data) { +proto.aggregator.UpdateChecksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); @@ -819,60 +846,105 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.UpdateChecksResp.displayName = - "proto.aggregator.UpdateChecksResp"; + proto.aggregator.UpdateChecksResp.displayName = 'proto.aggregator.UpdateChecksResp'; } - -if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.CreateWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * @public + * @override */ - proto.aggregator.UUID.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); - }; - + proto.aggregator.CreateWalletReq.displayName = 'proto.aggregator.CreateWalletReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.CreateWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.UUID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @public + * @override */ - proto.aggregator.UUID.toObject = function (includeInstance, msg) { - var f, - obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + proto.aggregator.CreateWalletResp.displayName = 'proto.aggregator.CreateWalletResp'; +} + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UUID.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.UUID} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.UUID.toObject = function(includeInstance, msg) { + var f, obj = { + bytes: jspb.Message.getFieldWithDefault(msg, 1, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.aggregator.UUID} */ -proto.aggregator.UUID.deserializeBinary = function (bytes) { +proto.aggregator.UUID.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID(); + var msg = new proto.aggregator.UUID; return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -880,35 +952,37 @@ proto.aggregator.UUID.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.UUID} */ -proto.aggregator.UUID.deserializeBinaryFromReader = function (msg, reader) { +proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setBytes(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setBytes(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UUID.prototype.serializeBinary = function () { +proto.aggregator.UUID.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.UUID.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -916,88 +990,97 @@ proto.aggregator.UUID.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UUID.serializeBinaryToWriter = function (message, writer) { +proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBytes(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; + /** * optional string bytes = 1; * @return {string} */ -proto.aggregator.UUID.prototype.getBytes = function () { +proto.aggregator.UUID.prototype.getBytes = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.aggregator.UUID} returns this */ -proto.aggregator.UUID.prototype.setBytes = function (value) { +proto.aggregator.UUID.prototype.setBytes = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.Checkin.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.Checkin.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.Checkin} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.Checkin.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: - (f = msg.getStatus()) && - proto.aggregator.Checkin.Status.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 5, ""), - metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteip: jspb.Message.getFieldWithDefault(msg, 7, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.Checkin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Checkin.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.aggregator.Checkin} */ -proto.aggregator.Checkin.deserializeBinary = function (bytes) { +proto.aggregator.Checkin.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin(); + var msg = new proto.aggregator.Checkin; return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1005,63 +1088,62 @@ proto.aggregator.Checkin.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.Checkin} */ -proto.aggregator.Checkin.deserializeBinaryFromReader = function (msg, reader) { +proto.aggregator.Checkin.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 4: - var value = new proto.aggregator.Checkin.Status(); - reader.readMessage( - value, - proto.aggregator.Checkin.Status.deserializeBinaryFromReader - ); - msg.setStatus(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMetricsport(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRemoteip(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 4: + var value = new proto.aggregator.Checkin.Status; + reader.readMessage(value,proto.aggregator.Checkin.Status.deserializeBinaryFromReader); + msg.setStatus(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMetricsport(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRemoteip(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Checkin.prototype.serializeBinary = function () { +proto.aggregator.Checkin.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1069,19 +1151,28 @@ proto.aggregator.Checkin.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Checkin.serializeBinaryToWriter = function (message, writer) { +proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getStatus(); if (f != null) { @@ -1093,77 +1184,85 @@ proto.aggregator.Checkin.serializeBinaryToWriter = function (message, writer) { } f = message.getVersion(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 5, + f + ); } f = message.getMetricsport(); if (f !== 0) { - writer.writeInt32(6, f); + writer.writeInt32( + 6, + f + ); } f = message.getRemoteip(); if (f.length > 0) { - writer.writeString(7, f); + writer.writeString( + 7, + f + ); } }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.Checkin.Status.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.Checkin.Status} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.Checkin.Status.toObject = function (includeInstance, msg) { - var f, - obj = { - uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), - queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastHeartbeat: - (f = msg.getLastHeartbeat()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.Checkin.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { + var f, obj = { + uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), + queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), + lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.aggregator.Checkin.Status} */ -proto.aggregator.Checkin.Status.deserializeBinary = function (bytes) { +proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.Checkin.Status; + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1171,50 +1270,46 @@ proto.aggregator.Checkin.Status.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.Checkin.Status} */ -proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setUptime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setQueuedepth(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); - msg.setLastHeartbeat(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUptime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setQueuedepth(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastHeartbeat(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Checkin.Status.prototype.serializeBinary = function () { +proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1222,18 +1317,21 @@ proto.aggregator.Checkin.Status.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Checkin.Status.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUptime(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getQueuedepth(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getLastHeartbeat(); if (f != null) { @@ -1245,260 +1343,280 @@ proto.aggregator.Checkin.Status.serializeBinaryToWriter = function ( } }; + /** * optional int64 uptime = 1; * @return {number} */ -proto.aggregator.Checkin.Status.prototype.getUptime = function () { +proto.aggregator.Checkin.Status.prototype.getUptime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.Checkin.Status} returns this */ -proto.aggregator.Checkin.Status.prototype.setUptime = function (value) { +proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; + /** * optional int64 queueDepth = 2; * @return {number} */ -proto.aggregator.Checkin.Status.prototype.getQueuedepth = function () { +proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.Checkin.Status} returns this */ -proto.aggregator.Checkin.Status.prototype.setQueuedepth = function (value) { +proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; + /** * optional google.protobuf.Timestamp last_heartbeat = 3; * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function () { +proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 3 - ) - ); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; + /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.aggregator.Checkin.Status} returns this - */ -proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function (value) { +*/ +proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; + /** * Clears the message field making it undefined. * @return {!proto.aggregator.Checkin.Status} returns this */ -proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function () { +proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { return this.setLastHeartbeat(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function () { +proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { return jspb.Message.getField(this, 3) != null; }; + /** * optional string id = 1; * @return {string} */ -proto.aggregator.Checkin.prototype.getId = function () { +proto.aggregator.Checkin.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setId = function (value) { +proto.aggregator.Checkin.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional string address = 2; * @return {string} */ -proto.aggregator.Checkin.prototype.getAddress = function () { +proto.aggregator.Checkin.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setAddress = function (value) { +proto.aggregator.Checkin.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + /** * optional string signature = 3; * @return {string} */ -proto.aggregator.Checkin.prototype.getSignature = function () { +proto.aggregator.Checkin.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setSignature = function (value) { +proto.aggregator.Checkin.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + /** * optional Status status = 4; * @return {?proto.aggregator.Checkin.Status} */ -proto.aggregator.Checkin.prototype.getStatus = function () { +proto.aggregator.Checkin.prototype.getStatus = function() { return /** @type{?proto.aggregator.Checkin.Status} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) - ); + jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4)); }; + /** * @param {?proto.aggregator.Checkin.Status|undefined} value * @return {!proto.aggregator.Checkin} returns this - */ -proto.aggregator.Checkin.prototype.setStatus = function (value) { +*/ +proto.aggregator.Checkin.prototype.setStatus = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; + /** * Clears the message field making it undefined. * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.clearStatus = function () { +proto.aggregator.Checkin.prototype.clearStatus = function() { return this.setStatus(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.Checkin.prototype.hasStatus = function () { +proto.aggregator.Checkin.prototype.hasStatus = function() { return jspb.Message.getField(this, 4) != null; }; + /** * optional string version = 5; * @return {string} */ -proto.aggregator.Checkin.prototype.getVersion = function () { +proto.aggregator.Checkin.prototype.getVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setVersion = function (value) { +proto.aggregator.Checkin.prototype.setVersion = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; + /** * optional int32 metricsPort = 6; * @return {number} */ -proto.aggregator.Checkin.prototype.getMetricsport = function () { +proto.aggregator.Checkin.prototype.getMetricsport = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setMetricsport = function (value) { +proto.aggregator.Checkin.prototype.setMetricsport = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; + /** * optional string remoteIP = 7; * @return {string} */ -proto.aggregator.Checkin.prototype.getRemoteip = function () { +proto.aggregator.Checkin.prototype.getRemoteip = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setRemoteip = function (value) { +proto.aggregator.Checkin.prototype.setRemoteip = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.CheckinResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); - }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.CheckinResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CheckinResp.toObject = function (includeInstance, msg) { - var f, - obj = { - updatedAt: - (f = msg.getUpdatedAt()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CheckinResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.aggregator.CheckinResp} */ -proto.aggregator.CheckinResp.deserializeBinary = function (bytes) { +proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CheckinResp(); + var msg = new proto.aggregator.CheckinResp; return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1506,42 +1624,38 @@ proto.aggregator.CheckinResp.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.CheckinResp} */ -proto.aggregator.CheckinResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CheckinResp.prototype.serializeBinary = function () { +proto.aggregator.CheckinResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1549,10 +1663,7 @@ proto.aggregator.CheckinResp.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CheckinResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUpdatedAt(); if (f != null) { @@ -1564,99 +1675,102 @@ proto.aggregator.CheckinResp.serializeBinaryToWriter = function ( } }; + /** * optional google.protobuf.Timestamp updated_at = 1; * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.CheckinResp.prototype.getUpdatedAt = function () { +proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) - ); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); }; + /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.aggregator.CheckinResp} returns this - */ -proto.aggregator.CheckinResp.prototype.setUpdatedAt = function (value) { +*/ +proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; + /** * Clears the message field making it undefined. * @return {!proto.aggregator.CheckinResp} returns this */ -proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function () { +proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { return this.setUpdatedAt(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function () { +proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 1) != null; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.SyncTasksReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.SyncTasksReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.SyncTasksReq.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.SyncTasksReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.aggregator.SyncTasksReq} */ -proto.aggregator.SyncTasksReq.deserializeBinary = function (bytes) { +proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq(); + var msg = new proto.aggregator.SyncTasksReq; return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1664,50 +1778,49 @@ proto.aggregator.SyncTasksReq.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.SyncTasksReq} */ -proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMonotonicClock(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMonotonicClock(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.SyncTasksReq.prototype.serializeBinary = function () { +proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1715,5757 +1828,7164 @@ proto.aggregator.SyncTasksReq.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getMonotonicClock(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); } }; + /** * optional string id = 1; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getId = function () { +proto.aggregator.SyncTasksReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setId = function (value) { +proto.aggregator.SyncTasksReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional string address = 2; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getAddress = function () { +proto.aggregator.SyncTasksReq.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setAddress = function (value) { +proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + /** * optional string signature = 3; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getSignature = function () { +proto.aggregator.SyncTasksReq.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setSignature = function (value) { +proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + /** * optional int64 monotonic_clock = 4; * @return {number} */ -proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function () { +proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function (value) { +proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.TaskTrigger.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.TaskTrigger} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.TaskTrigger.toObject = function (includeInstance, msg) { - var f, - obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - schedule: - (f = msg.getSchedule()) && - proto.aggregator.TimeCondition.toObject(includeInstance, f), - contractQuery: - (f = msg.getContractQuery()) && - proto.aggregator.ContractQueryCondition.toObject(includeInstance, f), - expression: - (f = msg.getExpression()) && - proto.aggregator.ExpressionCondition.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.FixedEpochCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { + var f, obj = { + epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskTrigger} + * @return {!proto.aggregator.FixedEpochCondition} */ -proto.aggregator.TaskTrigger.deserializeBinary = function (bytes) { +proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.FixedEpochCondition; + return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TaskTrigger} msg The message object to deserialize into. + * @param {!proto.aggregator.FixedEpochCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TaskTrigger} + * @return {!proto.aggregator.FixedEpochCondition} */ -proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.TriggerType} */ ( - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: - var value = new proto.aggregator.TimeCondition(); - reader.readMessage( - value, - proto.aggregator.TimeCondition.deserializeBinaryFromReader - ); - msg.setSchedule(value); - break; - case 3: - var value = new proto.aggregator.ContractQueryCondition(); - reader.readMessage( - value, - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader - ); - msg.setContractQuery(value); - break; - case 4: - var value = new proto.aggregator.ExpressionCondition(); - reader.readMessage( - value, - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addEpoches(values[i]); + } + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TaskTrigger.prototype.serializeBinary = function () { +proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TaskTrigger} message + * @param {!proto.aggregator.FixedEpochCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskTrigger.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTriggerType(); - if (f !== 0.0) { - writer.writeEnum(1, f); - } - f = message.getSchedule(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.TimeCondition.serializeBinaryToWriter - ); - } - f = message.getContractQuery(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter - ); - } - f = message.getExpression(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.ExpressionCondition.serializeBinaryToWriter + f = message.getEpochesList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f ); } }; -/** - * optional TriggerType trigger_type = 1; - * @return {!proto.aggregator.TriggerType} - */ -proto.aggregator.TaskTrigger.prototype.getTriggerType = function () { - return /** @type {!proto.aggregator.TriggerType} */ ( - jspb.Message.getFieldWithDefault(this, 1, 0) - ); -}; /** - * @param {!proto.aggregator.TriggerType} value - * @return {!proto.aggregator.TaskTrigger} returns this + * repeated int64 epoches = 1; + * @return {!Array} */ -proto.aggregator.TaskTrigger.prototype.setTriggerType = function (value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; -/** - * optional TimeCondition schedule = 2; - * @return {?proto.aggregator.TimeCondition} - */ -proto.aggregator.TaskTrigger.prototype.getSchedule = function () { - return /** @type{?proto.aggregator.TimeCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); -}; /** - * @param {?proto.aggregator.TimeCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this + * @param {!Array} value + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.setSchedule = function (value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearSchedule = function () { - return this.setSchedule(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @param {number=} opt_index + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.hasSchedule = function () { - return jspb.Message.getField(this, 2) != null; +proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; -/** - * optional ContractQueryCondition contract_query = 3; - * @return {?proto.aggregator.ContractQueryCondition} - */ -proto.aggregator.TaskTrigger.prototype.getContractQuery = function () { - return /** @type{?proto.aggregator.ContractQueryCondition} */ ( - jspb.Message.getWrapperField( - this, - proto.aggregator.ContractQueryCondition, - 3 - ) - ); -}; /** - * @param {?proto.aggregator.ContractQueryCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.setContractQuery = function (value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { + return this.setEpochesList([]); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearContractQuery = function () { - return this.setContractQuery(undefined); -}; -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.hasContractQuery = function () { - return jspb.Message.getField(this, 3) != null; -}; /** - * optional ExpressionCondition expression = 4; - * @return {?proto.aggregator.ExpressionCondition} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskTrigger.prototype.getExpression = function () { - return /** @type{?proto.aggregator.ExpressionCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) - ); -}; +proto.aggregator.CronCondition.repeatedFields_ = [1]; -/** - * @param {?proto.aggregator.ExpressionCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.setExpression = function (value) { - return jspb.Message.setWrapperField(this, 4, value); -}; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearExpression = function () { - return this.setExpression(undefined); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.TaskTrigger.prototype.hasExpression = function () { - return jspb.Message.getField(this, 4) != null; +proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CronCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.repeatedFields_ = [1]; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.TimeCondition.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); +proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { + var f, obj = { + cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.TimeCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.TimeCondition.toObject = function (includeInstance, msg) { - var f, - obj = { - fixedList: - (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TimeCondition} + * @return {!proto.aggregator.CronCondition} */ -proto.aggregator.TimeCondition.deserializeBinary = function (bytes) { +proto.aggregator.CronCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TimeCondition(); - return proto.aggregator.TimeCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.CronCondition; + return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TimeCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.CronCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TimeCondition} + * @return {!proto.aggregator.CronCondition} */ -proto.aggregator.TimeCondition.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var values = /** @type {!Array} */ ( - reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] - ); - for (var i = 0; i < values.length; i++) { - msg.addFixed(values[i]); - } - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCron(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addCronTable(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TimeCondition.prototype.serializeBinary = function () { +proto.aggregator.CronCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TimeCondition} message + * @param {!proto.aggregator.CronCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64(1, f); - } - f = message.getCron(); + f = message.getCronTableList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedString( + 1, + f + ); } }; + /** - * repeated int64 fixed = 1; - * @return {!Array} + * repeated string cron_table = 1; + * @return {!Array} */ -proto.aggregator.TimeCondition.prototype.getFixedList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.aggregator.CronCondition.prototype.getCronTableList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; + /** - * @param {!Array} value - * @return {!proto.aggregator.TimeCondition} returns this + * @param {!Array} value + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.setFixedList = function (value) { +proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { return jspb.Message.setField(this, 1, value || []); }; + /** - * @param {number} value + * @param {string} value * @param {number=} opt_index - * @return {!proto.aggregator.TimeCondition} returns this + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.addFixed = function ( - value, - opt_index -) { +proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; + /** * Clears the list making it empty but non-null. - * @return {!proto.aggregator.TimeCondition} returns this + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.clearFixedList = function () { - return this.setFixedList([]); +proto.aggregator.CronCondition.prototype.clearCronTableList = function() { + return this.setCronTableList([]); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string cron = 2; - * @return {string} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.TimeCondition.prototype.getCron = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); }; + /** - * @param {string} value - * @return {!proto.aggregator.TimeCondition} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.BlockCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.prototype.setCron = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { + var f, obj = { + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ContractQueryCondition.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ContractQueryCondition.toObject( - opt_includeInstance, - this - ); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ContractQueryCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ContractQueryCondition.toObject = function ( - includeInstance, - msg - ) { - var f, - obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; -} /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractQueryCondition} + * @return {!proto.aggregator.BlockCondition} */ -proto.aggregator.ContractQueryCondition.deserializeBinary = function (bytes) { +proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryCondition(); - return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.BlockCondition; + return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ContractQueryCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.BlockCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ContractQueryCondition} + * @return {!proto.aggregator.BlockCondition} */ -proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCallmsg(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInterval(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractQueryCondition.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; +proto.aggregator.BlockCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractQueryCondition} message + * @param {!proto.aggregator.BlockCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); } }; -/** - * optional string contract_address = 1; - * @return {string} - */ -proto.aggregator.ContractQueryCondition.prototype.getContractAddress = - function () { - return /** @type {string} */ ( - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; /** - * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} returns this + * optional int64 interval = 1; + * @return {number} */ -proto.aggregator.ContractQueryCondition.prototype.setContractAddress = - function (value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; +proto.aggregator.BlockCondition.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + /** - * optional string callmsg = 2; - * @return {string} + * @param {number} value + * @return {!proto.aggregator.BlockCondition} returns this */ -proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function ( - value -) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); }; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ExpressionCondition.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ExpressionCondition.toObject( - opt_includeInstance, - this - ); - }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ExpressionCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ExpressionCondition.toObject = function ( - includeInstance, - msg - ) { - var f, - obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.EventCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ExpressionCondition} + * @return {!proto.aggregator.EventCondition} */ -proto.aggregator.ExpressionCondition.deserializeBinary = function (bytes) { +proto.aggregator.EventCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ExpressionCondition(); - return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.EventCondition; + return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ExpressionCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.EventCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ExpressionCondition} + * @return {!proto.aggregator.EventCondition} */ -proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ExpressionCondition.prototype.serializeBinary = function () { +proto.aggregator.EventCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ExpressionCondition} message + * @param {!proto.aggregator.EventCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; + /** * optional string expression = 1; * @return {string} */ -proto.aggregator.ExpressionCondition.prototype.getExpression = function () { +proto.aggregator.EventCondition.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.ExpressionCondition} returns this + * @return {!proto.aggregator.EventCondition} returns this */ -proto.aggregator.ExpressionCondition.prototype.setExpression = function ( - value -) { +proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.aggregator.TaskTrigger.oneofGroups_ = [[2,3,4,5,6]]; + +/** + * @enum {number} + */ +proto.aggregator.TaskTrigger.TriggerConditionCase = { + TRIGGER_CONDITION_NOT_SET: 0, + MANUAL: 2, + AT: 3, + CRON: 4, + BLOCK: 5, + EVENT: 6 +}; + +/** + * @return {proto.aggregator.TaskTrigger.TriggerConditionCase} + */ +proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { + return /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0])); +}; + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.SyncTasksResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.SyncTasksResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.SyncTasksResp.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: - (f = msg.getTrigger()) && - proto.aggregator.TaskTrigger.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskTrigger} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + var f, obj = { + triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.SyncTasksResp} + * @return {!proto.aggregator.TaskTrigger} */ -proto.aggregator.SyncTasksResp.deserializeBinary = function (bytes) { +proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.TaskTrigger; + return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.SyncTasksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.TaskTrigger} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.SyncTasksResp} + * @return {!proto.aggregator.TaskTrigger} */ -proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); - msg.setTrigger(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {!proto.aggregator.TriggerType} */ (reader.readEnum()); + msg.setTriggerType(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setManual(value); + break; + case 3: + var value = new proto.aggregator.FixedEpochCondition; + reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setAt(value); + break; + case 4: + var value = new proto.aggregator.CronCondition; + reader.readMessage(value,proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 5: + var value = new proto.aggregator.BlockCondition; + reader.readMessage(value,proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 6: + var value = new proto.aggregator.EventCondition; + reader.readMessage(value,proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.SyncTasksResp.prototype.serializeBinary = function () { +proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.SyncTasksResp} message + * @param {!proto.aggregator.TaskTrigger} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); + f = message.getTriggerType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString(2, f); + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); } - f = message.getTrigger(); + f = message.getAt(); if (f != null) { writer.writeMessage( 3, f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter ); } }; + /** - * optional string id = 1; - * @return {string} + * optional TriggerType trigger_type = 1; + * @return {!proto.aggregator.TriggerType} */ -proto.aggregator.SyncTasksResp.prototype.getId = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { + return /** @type {!proto.aggregator.TriggerType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** - * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * @param {!proto.aggregator.TriggerType} value + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.setId = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; + /** - * optional string checkType = 2; - * @return {string} + * optional bool manual = 2; + * @return {boolean} */ -proto.aggregator.SyncTasksResp.prototype.getChecktype = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.TaskTrigger.prototype.getManual = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; + /** - * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * @param {boolean} value + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.setChecktype = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; + /** - * optional TaskTrigger trigger = 3; - * @return {?proto.aggregator.TaskTrigger} + * Clears the field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.getTrigger = function () { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) - ); +proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], undefined); }; + /** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.SyncTasksResp.prototype.setTrigger = function (value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional FixedEpochCondition at = 3; + * @return {?proto.aggregator.FixedEpochCondition} + */ +proto.aggregator.TaskTrigger.prototype.getAt = function() { + return /** @type{?proto.aggregator.FixedEpochCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3)); +}; + + +/** + * @param {?proto.aggregator.FixedEpochCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setAt = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; + /** * Clears the message field making it undefined. - * @return {!proto.aggregator.SyncTasksResp} returns this + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.clearTrigger = function () { - return this.setTrigger(undefined); +proto.aggregator.TaskTrigger.prototype.clearAt = function() { + return this.setAt(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.SyncTasksResp.prototype.hasTrigger = function () { +proto.aggregator.TaskTrigger.prototype.hasAt = function() { return jspb.Message.getField(this, 3) != null; }; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ETHTransfer.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ETHTransfer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ETHTransfer.toObject = function (includeInstance, msg) { - var f, - obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ETHTransfer} + * optional CronCondition cron = 4; + * @return {?proto.aggregator.CronCondition} */ -proto.aggregator.ETHTransfer.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer(); - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); +proto.aggregator.TaskTrigger.prototype.getCron = function() { + return /** @type{?proto.aggregator.CronCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4)); }; + /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.ETHTransfer} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ETHTransfer} - */ -proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function ( - msg, - reader -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.aggregator.CronCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; + /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ETHTransfer.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(undefined); }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ETHTransfer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ETHTransfer.serializeBinaryToWriter = function ( - message, - writer -) { - var f = undefined; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString(2, f); - } +proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 4) != null; }; + /** - * optional string destination = 1; - * @return {string} + * optional BlockCondition block = 5; + * @return {?proto.aggregator.BlockCondition} */ -proto.aggregator.ETHTransfer.prototype.getDestination = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return /** @type{?proto.aggregator.BlockCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5)); }; + /** - * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this + * @param {?proto.aggregator.BlockCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ETHTransfer.prototype.setDestination = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(undefined); }; + /** - * optional string amount = 2; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ETHTransfer.prototype.getAmount = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 5) != null; }; + /** - * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this + * optional EventCondition event = 6; + * @return {?proto.aggregator.EventCondition} */ -proto.aggregator.ETHTransfer.prototype.setAmount = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return /** @type{?proto.aggregator.EventCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6)); +}; + + +/** + * @param {?proto.aggregator.EventCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this + */ +proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 6) != null; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ContractExecution.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ContractExecution.toObject( - opt_includeInstance, - this - ); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ContractExecution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ContractExecution.toObject = function ( - includeInstance, - msg - ) { - var f, - obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - encodedParams: jspb.Message.getFieldWithDefault(msg, 4, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.SyncTasksResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractExecution} + * @return {!proto.aggregator.SyncTasksResp} */ -proto.aggregator.ContractExecution.deserializeBinary = function (bytes) { +proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractExecution(); - return proto.aggregator.ContractExecution.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.SyncTasksResp; + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ContractExecution} msg The message object to deserialize into. + * @param {!proto.aggregator.SyncTasksResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ContractExecution} + * @return {!proto.aggregator.SyncTasksResp} */ -proto.aggregator.ContractExecution.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCallData(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMethod(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setEncodedParams(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChecktype(value); + break; + case 3: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractExecution.prototype.serializeBinary = function () { +proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractExecution} message + * @param {!proto.aggregator.SyncTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractExecution.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallData(); + f = message.getId(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } - f = message.getMethod(); + f = message.getChecktype(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getEncodedParams(); - if (f.length > 0) { - writer.writeString(4, f); + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); } }; + /** - * optional string contract_address = 1; + * optional string id = 1; * @return {string} */ -proto.aggregator.ContractExecution.prototype.getContractAddress = function () { +proto.aggregator.SyncTasksResp.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.ContractExecution.prototype.setContractAddress = function ( - value -) { +proto.aggregator.SyncTasksResp.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string call_data = 2; + * optional string checkType = 2; * @return {string} */ -proto.aggregator.ContractExecution.prototype.getCallData = function () { +proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.ContractExecution.prototype.setCallData = function (value) { +proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * optional string method = 3; - * @return {string} + * optional TaskTrigger trigger = 3; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.ContractExecution.prototype.getMethod = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3)); }; + /** - * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this - */ -proto.aggregator.ContractExecution.prototype.setMethod = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); + * @param {?proto.aggregator.TaskTrigger|undefined} value + * @return {!proto.aggregator.SyncTasksResp} returns this +*/ +proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; + /** - * optional string encoded_params = 4; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.ContractExecution.prototype.getEncodedParams = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { + return this.setTrigger(undefined); }; + /** - * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ContractExecution.prototype.setEncodedParams = function ( - value -) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 3) != null; }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.GraphQLDataQuery.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.GraphQLDataQuery.toObject( - opt_includeInstance, - this - ); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.GraphQLDataQuery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.GraphQLDataQuery.toObject = function (includeInstance, msg) { - var f, - obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.ETHTransferNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { + var f, obj = { + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.GraphQLDataQuery} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.GraphQLDataQuery.deserializeBinary = function (bytes) { +proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLDataQuery(); - return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ETHTransferNode; + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.GraphQLDataQuery} msg The message object to deserialize into. + * @param {!proto.aggregator.ETHTransferNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.GraphQLDataQuery} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setQuery(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setDestination(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function () { +proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.GraphQLDataQuery} message + * @param {!proto.aggregator.ETHTransferNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); + f = message.getDestination(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getQuery(); + f = message.getAmount(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; + /** - * optional string url = 1; + * optional string destination = 1; * @return {string} */ -proto.aggregator.GraphQLDataQuery.prototype.getUrl = function () { +proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.GraphQLDataQuery} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.GraphQLDataQuery.prototype.setUrl = function (value) { +proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string query = 2; + * optional string amount = 2; * @return {string} */ -proto.aggregator.GraphQLDataQuery.prototype.getQuery = function () { +proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.GraphQLDataQuery} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.GraphQLDataQuery.prototype.setQuery = function (value) { +proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.HTTPAPICall.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.HTTPAPICall} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.HTTPAPICall.toObject = function (includeInstance, msg) { - var f, - obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) - ? f.toObject(includeInstance, undefined) - : [], - body: jspb.Message.getFieldWithDefault(msg, 3, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.ContractWriteNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.HTTPAPICall} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.HTTPAPICall.deserializeBinary = function (bytes) { +proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.HTTPAPICall(); - return proto.aggregator.HTTPAPICall.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractWriteNode; + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.HTTPAPICall} msg The message object to deserialize into. + * @param {!proto.aggregator.ContractWriteNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.HTTPAPICall} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function (message, reader) { - jspb.Map.deserializeBinary( - message, - reader, - jspb.BinaryReader.prototype.readString, - jspb.BinaryReader.prototype.readString, - null, - "", - "" - ); - }); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCallData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.HTTPAPICall.prototype.serializeBinary = function () { +proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.HTTPAPICall} message + * @param {!proto.aggregator.ContractWriteNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); + f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary( + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( 2, - writer, - jspb.BinaryWriter.prototype.writeString, - jspb.BinaryWriter.prototype.writeString + f ); } - f = message.getBody(); + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; + /** - * optional string url = 1; + * optional string contract_address = 1; * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getUrl = function () { +proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.HTTPAPICall} returns this + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.HTTPAPICall.prototype.setUrl = function (value) { +proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * map headers = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * optional string call_data = 2; + * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function ( - opt_noLazyCreate -) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, null) - ); +proto.aggregator.ContractWriteNode.prototype.getCallData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** - * Clears values from the map. The map will be non-null. - * @return {!proto.aggregator.HTTPAPICall} returns this + * @param {string} value + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function () { - this.getHeadersMap().clear(); - return this; +proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * optional string body = 3; + * optional string contract_abi = 3; * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getBody = function () { +proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.HTTPAPICall} returns this + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.HTTPAPICall.prototype.setBody = function (value) { +proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.CustomCode.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.CustomCode} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CustomCode.toObject = function (includeInstance, msg) { - var f, - obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.ContractQueryNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CustomCode} + * @return {!proto.aggregator.ContractQueryNode} */ -proto.aggregator.CustomCode.deserializeBinary = function (bytes) { +proto.aggregator.ContractQueryNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCode(); - return proto.aggregator.CustomCode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractQueryNode; + return proto.aggregator.ContractQueryNode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CustomCode} msg The message object to deserialize into. + * @param {!proto.aggregator.ContractQueryNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CustomCode} + * @return {!proto.aggregator.ContractQueryNode} */ -proto.aggregator.CustomCode.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.CustomCodeType} */ ( - reader.readEnum() - ); - msg.setType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCallData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CustomCode.prototype.serializeBinary = function () { +proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CustomCode} message + * @param {!proto.aggregator.ContractQueryNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CustomCode.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum(1, f); + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); } - f = message.getBody(); + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 3, + f + ); } }; + /** - * optional CustomCodeType type = 1; - * @return {!proto.aggregator.CustomCodeType} + * optional string contract_address = 1; + * @return {string} */ -proto.aggregator.CustomCode.prototype.getType = function () { - return /** @type {!proto.aggregator.CustomCodeType} */ ( - jspb.Message.getFieldWithDefault(this, 1, 0) - ); +proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** - * @param {!proto.aggregator.CustomCodeType} value - * @return {!proto.aggregator.CustomCode} returns this + * @param {string} value + * @return {!proto.aggregator.ContractQueryNode} returns this */ -proto.aggregator.CustomCode.prototype.setType = function (value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string body = 2; + * optional string call_data = 2; * @return {string} */ -proto.aggregator.CustomCode.prototype.getBody = function () { +proto.aggregator.ContractQueryNode.prototype.getCallData = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.CustomCode} returns this + * @return {!proto.aggregator.ContractQueryNode} returns this */ -proto.aggregator.CustomCode.prototype.setBody = function (value) { +proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + +/** + * optional string contract_abi = 3; + * @return {string} + */ +proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ContractQueryNode} returns this + */ +proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ConditionJump.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ConditionJump} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ConditionJump.toObject = function (includeInstance, msg) { - var f, - obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.GraphQLQueryNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.ConditionJump.deserializeBinary = function (bytes) { +proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.GraphQLQueryNode; + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ConditionJump} msg The message object to deserialize into. + * @param {!proto.aggregator.GraphQLQueryNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.ConditionJump.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNext(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ConditionJump.prototype.serializeBinary = function () { +proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ConditionJump} message + * @param {!proto.aggregator.GraphQLQueryNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ConditionJump.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getExpression(); + f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getNext(); + f = message.getQuery(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; + /** - * optional string expression = 1; + * optional string url = 1; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getExpression = function () { +proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.ConditionJump.prototype.setExpression = function (value) { +proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string next = 2; + * optional string query = 2; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getNext = function () { +proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.ConditionJump.prototype.setNext = function (value) { +proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.BranchAction.repeatedFields_ = [2]; +proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.BranchAction.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); - }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.BranchAction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.BranchAction.toObject = function (includeInstance, msg) { - var f, - obj = { - pb_if: - (f = msg.getIf()) && - proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList( - msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, - includeInstance - ), - pb_else: - (f = msg.getElse()) && - proto.aggregator.ConditionJump.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.RestAPINode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.BranchAction} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.BranchAction.deserializeBinary = function (bytes) { +proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.RestAPINode; + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.BranchAction} msg The message object to deserialize into. + * @param {!proto.aggregator.RestAPINode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.BranchAction} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.BranchAction.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); - msg.setElse(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.BranchAction.prototype.serializeBinary = function () { +proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.BranchAction} message + * @param {!proto.aggregator.RestAPINode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.BranchAction.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIf(); - if (f != null) { - writer.writeMessage( + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElseifsList(); + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + writer.writeString( + 3, + f ); } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f ); } }; -/** - * optional ConditionJump If = 1; - * @return {?proto.aggregator.ConditionJump} - */ -proto.aggregator.BranchAction.prototype.getIf = function () { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) - ); -}; /** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchAction} returns this + * optional string url = 1; + * @return {string} */ -proto.aggregator.BranchAction.prototype.setIf = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.aggregator.RestAPINode.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this - */ -proto.aggregator.BranchAction.prototype.clearIf = function () { - return this.setIf(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.hasIf = function () { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.RestAPINode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * repeated ConditionJump ElseIfs = 2; - * @return {!Array} - */ -proto.aggregator.BranchAction.prototype.getElseifsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ConditionJump, - 2 - ) - ); -}; /** - * @param {!Array} value - * @return {!proto.aggregator.BranchAction} returns this + * map headers = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.aggregator.BranchAction.prototype.setElseifsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); }; + /** - * @param {!proto.aggregator.ConditionJump=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.ConditionJump} + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.addElseifs = function ( - opt_value, - opt_index -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.ConditionJump, - opt_index - ); -}; +proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this;}; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.BranchAction} returns this + * optional string body = 3; + * @return {string} */ -proto.aggregator.BranchAction.prototype.clearElseifsList = function () { - return this.setElseifsList([]); +proto.aggregator.RestAPINode.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * optional ConditionJump Else = 3; - * @return {?proto.aggregator.ConditionJump} + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.getElse = function () { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) - ); +proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + /** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchAction} returns this + * optional string method = 4; + * @return {string} */ -proto.aggregator.BranchAction.prototype.setElse = function (value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.aggregator.RestAPINode.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.clearElse = function () { - return this.setElse(undefined); +proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.BranchAction.prototype.hasElse = function () { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CustomCodeNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.repeatedFields_ = [4]; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.TaskAction.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); +proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.TaskAction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.TaskAction.toObject = function (includeInstance, msg) { - var f, - obj = { - taskType: jspb.Message.getFieldWithDefault(msg, 1, 0), - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - nextList: - (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - ethTransfer: - (f = msg.getEthTransfer()) && - proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: - (f = msg.getContractExecution()) && - proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: - (f = msg.getGraphqlDataQuery()) && - proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: - (f = msg.getHttpDataQuery()) && - proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: - (f = msg.getCustomCode()) && - proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: - (f = msg.getBranch()) && - proto.aggregator.BranchAction.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskAction} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.TaskAction.deserializeBinary = function (bytes) { +proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CustomCodeNode; + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TaskAction} msg The message object to deserialize into. + * @param {!proto.aggregator.CustomCodeNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TaskAction} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.TaskAction.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.TaskType} */ ( - reader.readEnum() - ); - msg.setTaskType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.addNext(value); - break; - case 10: - var value = new proto.aggregator.ETHTransfer(); - reader.readMessage( - value, - proto.aggregator.ETHTransfer.deserializeBinaryFromReader - ); - msg.setEthTransfer(value); - break; - case 11: - var value = new proto.aggregator.ContractExecution(); - reader.readMessage( - value, - proto.aggregator.ContractExecution.deserializeBinaryFromReader - ); - msg.setContractExecution(value); - break; - case 12: - var value = new proto.aggregator.GraphQLDataQuery(); - reader.readMessage( - value, - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader - ); - msg.setGraphqlDataQuery(value); - break; - case 13: - var value = new proto.aggregator.HTTPAPICall(); - reader.readMessage( - value, - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader - ); - msg.setHttpDataQuery(value); - break; - case 14: - var value = new proto.aggregator.CustomCode(); - reader.readMessage( - value, - proto.aggregator.CustomCode.deserializeBinaryFromReader - ); - msg.setCustomCode(value); - break; - case 15: - var value = new proto.aggregator.BranchAction(); - reader.readMessage( - value, - proto.aggregator.BranchAction.deserializeBinaryFromReader - ); - msg.setBranch(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {!proto.aggregator.CustomCodeType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TaskAction.prototype.serializeBinary = function () { +proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TaskAction} message + * @param {!proto.aggregator.CustomCodeNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTaskType(); + f = message.getType(); if (f !== 0.0) { - writer.writeEnum(1, f); - } - f = message.getId(); - if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString(3, f); + writer.writeEnum( + 1, + f + ); } - f = message.getNextList(); + f = message.getSource(); if (f.length > 0) { - writer.writeRepeatedString(4, f); + writer.writeString( + 2, + f + ); } - f = message.getEthTransfer(); +}; + + +/** + * optional CustomCodeType type = 1; + * @return {!proto.aggregator.CustomCodeType} + */ +proto.aggregator.CustomCodeNode.prototype.getType = function() { + return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.aggregator.CustomCodeType} value + * @return {!proto.aggregator.CustomCodeNode} returns this + */ +proto.aggregator.CustomCodeNode.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string source = 2; + * @return {string} + */ +proto.aggregator.CustomCodeNode.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CustomCodeNode} returns this + */ +proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.ConditionJump} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, ""), + next: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.ConditionJump} + */ +proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ConditionJump; + return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.ConditionJump} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.ConditionJump} + */ +proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNext(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.ConditionJump.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.ConditionJump} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getNext(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string expression = 1; + * @return {string} + */ +proto.aggregator.ConditionJump.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ConditionJump} returns this + */ +proto.aggregator.ConditionJump.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string next = 2; + * @return {string} + */ +proto.aggregator.ConditionJump.prototype.getNext = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ConditionJump} returns this + */ +proto.aggregator.ConditionJump.prototype.setNext = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.BranchNode.repeatedFields_ = [2]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.BranchNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { + var f, obj = { + pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), + elseifsList: jspb.Message.toObjectList(msg.getElseifsList(), + proto.aggregator.ConditionJump.toObject, includeInstance), + pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.BranchNode} + */ +proto.aggregator.BranchNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.BranchNode; + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.BranchNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.BranchNode} + */ +proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.ConditionJump; + reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); + msg.setIf(value); + break; + case 2: + var value = new proto.aggregator.ConditionJump; + reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); + msg.addElseifs(value); + break; + case 3: + var value = new proto.aggregator.ConditionJump; + reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); + msg.setElse(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.BranchNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIf(); if (f != null) { writer.writeMessage( - 10, + 1, + f, + proto.aggregator.ConditionJump.serializeBinaryToWriter + ); + } + f = message.getElseifsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.aggregator.ConditionJump.serializeBinaryToWriter + ); + } + f = message.getElse(); + if (f != null) { + writer.writeMessage( + 3, f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + proto.aggregator.ConditionJump.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConditionJump if = 1; + * @return {?proto.aggregator.ConditionJump} + */ +proto.aggregator.BranchNode.prototype.getIf = function() { + return /** @type{?proto.aggregator.ConditionJump} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1)); +}; + + +/** + * @param {?proto.aggregator.ConditionJump|undefined} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setIf = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.BranchNode} returns this + */ +proto.aggregator.BranchNode.prototype.clearIf = function() { + return this.setIf(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.BranchNode.prototype.hasIf = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ConditionJump elseIfs = 2; + * @return {!Array} + */ +proto.aggregator.BranchNode.prototype.getElseifsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.aggregator.ConditionJump=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.ConditionJump} + */ +proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.BranchNode} returns this + */ +proto.aggregator.BranchNode.prototype.clearElseifsList = function() { + return this.setElseifsList([]); +}; + + +/** + * optional ConditionJump else = 3; + * @return {?proto.aggregator.ConditionJump} + */ +proto.aggregator.BranchNode.prototype.getElse = function() { + return /** @type{?proto.aggregator.ConditionJump} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3)); +}; + + +/** + * @param {?proto.aggregator.ConditionJump|undefined} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setElse = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.BranchNode} returns this + */ +proto.aggregator.BranchNode.prototype.clearElse = function() { + return this.setElse(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.BranchNode.prototype.hasElse = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.FilterNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.FilterNode} + */ +proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode; + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.FilterNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.FilterNode} + */ +proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.FilterNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string expression = 1; + * @return {string} + */ +proto.aggregator.FilterNode.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.FilterNode} returns this + */ +proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskEdge} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge; + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TaskEdge} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TaskEdge} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source = 2; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string target = 3; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17]]; + +/** + * @enum {number} + */ +proto.aggregator.TaskNode.TaskBodyCase = { + TASK_BODY_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + CUSTOM_CODE: 17 +}; + +/** + * @return {proto.aggregator.TaskNode.TaskBodyCase} + */ +proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { + return /** @type {proto.aggregator.TaskNode.TaskBodyCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { + var f, obj = { + nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractQueryNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.TaskNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskNode; + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TaskNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.aggregator.TaskType} */ (reader.readEnum()); + msg.setNodeType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 10: + var value = new proto.aggregator.ETHTransferNode; + reader.readMessage(value,proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); + msg.setEthTransfer(value); + break; + case 11: + var value = new proto.aggregator.ContractWriteNode; + reader.readMessage(value,proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); + break; + case 12: + var value = new proto.aggregator.ContractQueryNode; + reader.readMessage(value,proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + msg.setContractRead(value); + break; + case 13: + var value = new proto.aggregator.GraphQLQueryNode; + reader.readMessage(value,proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); + break; + case 14: + var value = new proto.aggregator.RestAPINode; + reader.readMessage(value,proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); + break; + case 15: + var value = new proto.aggregator.BranchNode; + reader.readMessage(value,proto.aggregator.BranchNode.deserializeBinaryFromReader); + msg.setBranch(value); + break; + case 16: + var value = new proto.aggregator.FilterNode; + reader.readMessage(value,proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.CustomCodeNode; + reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TaskNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEthTransfer(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.ETHTransferNode.serializeBinaryToWriter + ); + } + f = message.getContractWrite(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.aggregator.ContractWriteNode.serializeBinaryToWriter + ); + } + f = message.getContractRead(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.aggregator.ContractQueryNode.serializeBinaryToWriter + ); + } + f = message.getGraphqlDataQuery(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter + ); + } + f = message.getRestApi(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.aggregator.RestAPINode.serializeBinaryToWriter + ); + } + f = message.getBranch(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TaskType node_type = 1; + * @return {!proto.aggregator.TaskType} + */ +proto.aggregator.TaskNode.prototype.getNodeType = function() { + return /** @type {!proto.aggregator.TaskType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.aggregator.TaskType} value + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.setNodeType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string id = 2; + * @return {string} + */ +proto.aggregator.TaskNode.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.aggregator.TaskNode.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ETHTransferNode eth_transfer = 10; + * @return {?proto.aggregator.ETHTransferNode} + */ +proto.aggregator.TaskNode.prototype.getEthTransfer = function() { + return /** @type{?proto.aggregator.ETHTransferNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10)); +}; + + +/** + * @param {?proto.aggregator.ETHTransferNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { + return this.setEthTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ContractWriteNode contract_write = 11; + * @return {?proto.aggregator.ContractWriteNode} + */ +proto.aggregator.TaskNode.prototype.getContractWrite = function() { + return /** @type{?proto.aggregator.ContractWriteNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11)); +}; + + +/** + * @param {?proto.aggregator.ContractWriteNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ContractQueryNode contract_read = 12; + * @return {?proto.aggregator.ContractQueryNode} + */ +proto.aggregator.TaskNode.prototype.getContractRead = function() { + return /** @type{?proto.aggregator.ContractQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12)); +}; + + +/** + * @param {?proto.aggregator.ContractQueryNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional GraphQLQueryNode graphql_data_query = 13; + * @return {?proto.aggregator.GraphQLQueryNode} + */ +proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { + return /** @type{?proto.aggregator.GraphQLQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13)); +}; + + +/** + * @param {?proto.aggregator.GraphQLQueryNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RestAPINode rest_api = 14; + * @return {?proto.aggregator.RestAPINode} + */ +proto.aggregator.TaskNode.prototype.getRestApi = function() { + return /** @type{?proto.aggregator.RestAPINode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14)); +}; + + +/** + * @param {?proto.aggregator.RestAPINode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional BranchNode branch = 15; + * @return {?proto.aggregator.BranchNode} + */ +proto.aggregator.TaskNode.prototype.getBranch = function() { + return /** @type{?proto.aggregator.BranchNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15)); +}; + + +/** + * @param {?proto.aggregator.BranchNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearBranch = function() { + return this.setBranch(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasBranch = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional FilterNode filter = 16; + * @return {?proto.aggregator.FilterNode} + */ +proto.aggregator.TaskNode.prototype.getFilter = function() { + return /** @type{?proto.aggregator.FilterNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16)); +}; + + +/** + * @param {?proto.aggregator.FilterNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional CustomCodeNode custom_code = 17; + * @return {?proto.aggregator.CustomCodeNode} + */ +proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return /** @type{?proto.aggregator.CustomCodeNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17)); +}; + + +/** + * @param {?proto.aggregator.CustomCodeNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 17) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Execution.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.Execution} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + error: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.Execution} + */ +proto.aggregator.Execution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Execution; + return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Execution} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Execution} + */ +proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserOpHash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.Execution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Execution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.Execution} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEpoch(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getUserOpHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 3, + f ); } - f = message.getContractExecution(); +}; + + +/** + * optional int64 epoch = 1; + * @return {number} + */ +proto.aggregator.Execution.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string user_op_hash = 2; + * @return {string} + */ +proto.aggregator.Execution.prototype.getUserOpHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setUserOpHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string error = 3; + * @return {string} + */ +proto.aggregator.Execution.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.Task.repeatedFields_ = [11,12,13]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Task.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.Task} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Task.toObject = function(includeInstance, msg) { + var f, obj = { + id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), + memo: jspb.Message.getFieldWithDefault(msg, 7, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + status: jspb.Message.getFieldWithDefault(msg, 9, 0), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.aggregator.TaskNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance), + executionsList: jspb.Message.toObjectList(msg.getExecutionsList(), + proto.aggregator.Execution.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.Task} + */ +proto.aggregator.Task.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Task; + return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Task} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Task} + */ +proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.UUID; + reader.readMessage(value,proto.aggregator.UUID.deserializeBinaryFromReader); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartAt(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCompletedAt(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecurring(value); + break; + case 9: + var value = /** @type {!proto.aggregator.TaskStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 4: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 11: + var value = new proto.aggregator.TaskNode; + reader.readMessage(value,proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 12: + var value = new proto.aggregator.TaskEdge; + reader.readMessage(value,proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: + var value = new proto.aggregator.Execution; + reader.readMessage(value,proto.aggregator.Execution.deserializeBinaryFromReader); + msg.addExecutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.Task.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Task.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.Task} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); if (f != null) { writer.writeMessage( - 11, + 1, f, - proto.aggregator.ContractExecution.serializeBinaryToWriter + proto.aggregator.UUID.serializeBinaryToWriter ); } - f = message.getGraphqlDataQuery(); + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getCompletedAt(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getRecurring(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } + f = message.getTrigger(); if (f != null) { writer.writeMessage( - 12, + 4, f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter + proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getHttpDataQuery(); - if (f != null) { - writer.writeMessage( - 13, + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter + proto.aggregator.TaskNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); - if (f != null) { - writer.writeMessage( - 14, + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, f, - proto.aggregator.CustomCode.serializeBinaryToWriter + proto.aggregator.TaskEdge.serializeBinaryToWriter ); } - f = message.getBranch(); - if (f != null) { - writer.writeMessage( - 15, + f = message.getExecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, f, - proto.aggregator.BranchAction.serializeBinaryToWriter + proto.aggregator.Execution.serializeBinaryToWriter ); } }; + +/** + * optional UUID id = 1; + * @return {?proto.aggregator.UUID} + */ +proto.aggregator.Task.prototype.getId = function() { + return /** @type{?proto.aggregator.UUID} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1)); +}; + + /** - * optional TaskType task_type = 1; - * @return {!proto.aggregator.TaskType} + * @param {?proto.aggregator.UUID|undefined} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setId = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.getTaskType = function () { - return /** @type {!proto.aggregator.TaskType} */ ( - jspb.Message.getFieldWithDefault(this, 1, 0) - ); +proto.aggregator.Task.prototype.clearId = function() { + return this.setId(undefined); }; + /** - * @param {!proto.aggregator.TaskType} value - * @return {!proto.aggregator.TaskAction} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.TaskAction.prototype.setTaskType = function (value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.Task.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; }; + /** - * optional string id = 2; + * optional string owner = 2; * @return {string} */ -proto.aggregator.TaskAction.prototype.getId = function () { +proto.aggregator.Task.prototype.getOwner = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.setId = function (value) { +proto.aggregator.Task.prototype.setOwner = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * optional string name = 3; + * optional string smart_wallet_address = 3; * @return {string} */ -proto.aggregator.TaskAction.prototype.getName = function () { +proto.aggregator.Task.prototype.getSmartWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.setName = function (value) { +proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * repeated string next = 4; - * @return {!Array} - */ -proto.aggregator.TaskAction.prototype.getNextList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; /** - * @param {!Array} value - * @return {!proto.aggregator.TaskAction} returns this + * optional int64 start_at = 5; + * @return {number} */ -proto.aggregator.TaskAction.prototype.setNextList = function (value) { - return jspb.Message.setField(this, 4, value || []); +proto.aggregator.Task.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.addNext = function (value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.TaskAction} returns this + * @param {number} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.clearNextList = function () { - return this.setNextList([]); +proto.aggregator.Task.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; -/** - * optional ETHTransfer eth_transfer = 10; - * @return {?proto.aggregator.ETHTransfer} - */ -proto.aggregator.TaskAction.prototype.getEthTransfer = function () { - return /** @type{?proto.aggregator.ETHTransfer} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) - ); -}; /** - * @param {?proto.aggregator.ETHTransfer|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * optional int64 expired_at = 6; + * @return {number} */ -proto.aggregator.TaskAction.prototype.setEthTransfer = function (value) { - return jspb.Message.setWrapperField(this, 10, value); +proto.aggregator.Task.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.clearEthTransfer = function () { - return this.setEthTransfer(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasEthTransfer = function () { - return jspb.Message.getField(this, 10) != null; +proto.aggregator.Task.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; -/** - * optional ContractExecution contract_execution = 11; - * @return {?proto.aggregator.ContractExecution} - */ -proto.aggregator.TaskAction.prototype.getContractExecution = function () { - return /** @type{?proto.aggregator.ContractExecution} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) - ); -}; /** - * @param {?proto.aggregator.ContractExecution|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * optional string memo = 7; + * @return {string} */ -proto.aggregator.TaskAction.prototype.setContractExecution = function (value) { - return jspb.Message.setWrapperField(this, 11, value); +proto.aggregator.Task.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.clearContractExecution = function () { - return this.setContractExecution(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasContractExecution = function () { - return jspb.Message.getField(this, 11) != null; +proto.aggregator.Task.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); }; -/** - * optional GraphQLDataQuery graphql_data_query = 12; - * @return {?proto.aggregator.GraphQLDataQuery} - */ -proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function () { - return /** @type{?proto.aggregator.GraphQLDataQuery} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) - ); -}; /** - * @param {?proto.aggregator.GraphQLDataQuery|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * optional int64 completed_at = 8; + * @return {number} */ -proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function (value) { - return jspb.Message.setWrapperField(this, 12, value); +proto.aggregator.Task.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * @param {number} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function () { - return this.setGraphqlDataQuery(undefined); +proto.aggregator.Task.prototype.setCompletedAt = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; + /** - * Returns whether this field is set. + * optional bool recurring = 10; * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function () { - return jspb.Message.getField(this, 12) != null; +proto.aggregator.Task.prototype.getRecurring = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; -/** - * optional HTTPAPICall http_data_query = 13; - * @return {?proto.aggregator.HTTPAPICall} - */ -proto.aggregator.TaskAction.prototype.getHttpDataQuery = function () { - return /** @type{?proto.aggregator.HTTPAPICall} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) - ); -}; /** - * @param {?proto.aggregator.HTTPAPICall|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {boolean} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.setHttpDataQuery = function (value) { - return jspb.Message.setWrapperField(this, 13, value); +proto.aggregator.Task.prototype.setRecurring = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * optional TaskStatus status = 9; + * @return {!proto.aggregator.TaskStatus} */ -proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function () { - return this.setHttpDataQuery(undefined); +proto.aggregator.Task.prototype.getStatus = function() { + return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; + /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.aggregator.TaskStatus} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function () { - return jspb.Message.getField(this, 13) != null; +proto.aggregator.Task.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); }; + /** - * optional CustomCode custom_code = 14; - * @return {?proto.aggregator.CustomCode} + * optional TaskTrigger trigger = 4; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.TaskAction.prototype.getCustomCode = function () { - return /** @type{?proto.aggregator.CustomCode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) - ); +proto.aggregator.Task.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4)); }; + /** - * @param {?proto.aggregator.CustomCode|undefined} value - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.setCustomCode = function (value) { - return jspb.Message.setWrapperField(this, 14, value); + * @param {?proto.aggregator.TaskTrigger|undefined} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; + /** * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.clearCustomCode = function () { - return this.setCustomCode(undefined); +proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasCustomCode = function () { - return jspb.Message.getField(this, 14) != null; +proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 4) != null; }; -/** - * optional BranchAction branch = 15; - * @return {?proto.aggregator.BranchAction} - */ -proto.aggregator.TaskAction.prototype.getBranch = function () { - return /** @type{?proto.aggregator.BranchAction} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) - ); -}; /** - * @param {?proto.aggregator.BranchAction|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * repeated TaskNode nodes = 11; + * @return {!Array} */ -proto.aggregator.TaskAction.prototype.setBranch = function (value) { - return jspb.Message.setWrapperField(this, 15, value); +proto.aggregator.Task.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11)); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.clearBranch = function () { - return this.setBranch(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskAction.prototype.hasBranch = function () { - return jspb.Message.getField(this, 15) != null; + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.Execution.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); - }; - - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.Execution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.Execution.toObject = function (includeInstance, msg) { - var f, - obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.Execution} + * @param {!proto.aggregator.TaskNode=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.Execution.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution(); - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); +proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); }; + /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.Execution} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Execution} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Execution.deserializeBinaryFromReader = function ( - msg, - reader -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEpoch(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserOpHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); }; + /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated TaskEdge edges = 12; + * @return {!Array} */ -proto.aggregator.Execution.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.Task.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12)); }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.Execution} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aggregator.Execution.serializeBinaryToWriter = function ( - message, - writer -) { - var f = undefined; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64(1, f); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString(3, f); - } + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); }; + /** - * optional int64 epoch = 1; - * @return {number} + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.Execution.prototype.getEpoch = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); }; + /** - * @param {number} value - * @return {!proto.aggregator.Execution} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Execution.prototype.setEpoch = function (value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; + /** - * optional string user_op_hash = 2; - * @return {string} + * repeated Execution executions = 13; + * @return {!Array} */ -proto.aggregator.Execution.prototype.getUserOpHash = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.Task.prototype.getExecutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13)); }; + /** - * @param {string} value - * @return {!proto.aggregator.Execution} returns this - */ -proto.aggregator.Execution.prototype.setUserOpHash = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setExecutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; + /** - * optional string error = 3; - * @return {string} + * @param {!proto.aggregator.Execution=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Execution} */ -proto.aggregator.Execution.prototype.getError = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; + /** - * @param {string} value - * @return {!proto.aggregator.Execution} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Execution.prototype.setError = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.Task.prototype.clearExecutionsList = function() { + return this.setExecutionsList([]); }; + + /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.aggregator.Task.repeatedFields_ = [5, 12]; +proto.aggregator.CreateTaskReq.repeatedFields_ = [7,8]; + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.Task.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.Task.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.Task} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.Task.toObject = function (includeInstance, msg) { - var f, - obj = { - id: - (f = msg.getId()) && - proto.aggregator.UUID.toObject(includeInstance, f), - owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - trigger: - (f = msg.getTrigger()) && - proto.aggregator.TaskTrigger.toObject(includeInstance, f), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 9, 0), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - executionsList: jspb.Message.toObjectList( - msg.getExecutionsList(), - proto.aggregator.Execution.toObject, - includeInstance - ), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CreateTaskReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { + var f, obj = { + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.aggregator.TaskNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.Task} + * @return {!proto.aggregator.CreateTaskReq} */ -proto.aggregator.Task.deserializeBinary = function (bytes) { +proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Task(); - return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CreateTaskReq; + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.Task} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateTaskReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Task} + * @return {!proto.aggregator.CreateTaskReq} */ -proto.aggregator.Task.deserializeBinaryFromReader = function (msg, reader) { +proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.aggregator.UUID(); - reader.readMessage( - value, - proto.aggregator.UUID.deserializeBinaryFromReader - ); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSmartAccountAddress(value); - break; - case 4: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); - msg.setTrigger(value); - break; - case 5: - var value = new proto.aggregator.TaskAction(); - reader.readMessage( - value, - proto.aggregator.TaskAction.deserializeBinaryFromReader - ); - msg.addNodes(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartAt(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiredAt(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCompletedAt(value); - break; - case 10: - var value = /** @type {!proto.aggregator.TaskStatus} */ ( - reader.readEnum() - ); - msg.setStatus(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); - break; - case 12: - var value = new proto.aggregator.Execution(); - reader.readMessage( - value, - proto.aggregator.Execution.deserializeBinaryFromReader - ); - msg.addExecutions(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartAt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeatable(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode; + reader.readMessage(value,proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge; + reader.readMessage(value,proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Task.prototype.serializeBinary = function () { +proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.Task} message + * @param {!proto.aggregator.CreateTaskReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.serializeBinaryToWriter = function (message, writer) { +proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage(1, f, proto.aggregator.UUID.serializeBinaryToWriter); - } - f = message.getOwner(); - if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString(3, f); - } f = message.getTrigger(); if (f != null) { writer.writeMessage( - 4, + 1, f, proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter - ); - } f = message.getStartAt(); if (f !== 0) { - writer.writeInt64(6, f); + writer.writeInt64( + 2, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(7, f); + writer.writeInt64( + 3, + f + ); } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString(8, f); + f = message.getRepeatable(); + if (f) { + writer.writeBool( + 4, + f + ); } - f = message.getCompletedAt(); - if (f !== 0) { - writer.writeInt64(9, f); + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum(10, f); + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool(11, f); + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); } - f = message.getExecutionsList(); + f = message.getEdgesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 12, + 8, f, - proto.aggregator.Execution.serializeBinaryToWriter + proto.aggregator.TaskEdge.serializeBinaryToWriter ); } }; + /** - * optional UUID id = 1; - * @return {?proto.aggregator.UUID} + * optional TaskTrigger trigger = 1; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.Task.prototype.getId = function () { - return /** @type{?proto.aggregator.UUID} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) - ); +proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1)); }; + /** - * @param {?proto.aggregator.UUID|undefined} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setId = function (value) { + * @param {?proto.aggregator.TaskTrigger|undefined} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; + /** * Clears the message field making it undefined. - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.clearId = function () { - return this.setId(undefined); +proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { + return this.setTrigger(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.Task.prototype.hasId = function () { +proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { return jspb.Message.getField(this, 1) != null; }; -/** - * optional string owner = 2; - * @return {string} - */ -proto.aggregator.Task.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; /** - * @param {string} value - * @return {!proto.aggregator.Task} returns this + * optional int64 start_at = 2; + * @return {number} */ -proto.aggregator.Task.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** - * optional string smart_account_address = 3; - * @return {string} + * @param {number} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.getSmartAccountAddress = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + /** - * @param {string} value - * @return {!proto.aggregator.Task} returns this + * optional int64 expired_at = 3; + * @return {number} */ -proto.aggregator.Task.prototype.setSmartAccountAddress = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; + /** - * optional TaskTrigger trigger = 4; - * @return {?proto.aggregator.TaskTrigger} + * @param {number} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.getTrigger = function () { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); +proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; + /** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.Task} returns this + * optional bool repeatable = 4; + * @return {boolean} */ -proto.aggregator.Task.prototype.setTrigger = function (value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.Task} returns this + * @param {boolean} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.clearTrigger = function () { - return this.setTrigger(undefined); +proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; + /** - * Returns whether this field is set. - * @return {boolean} + * optional string smart_wallet_address = 5; + * @return {string} */ -proto.aggregator.Task.prototype.hasTrigger = function () { - return jspb.Message.getField(this, 4) != null; +proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; + /** - * repeated TaskAction nodes = 5; - * @return {!Array} + * @param {string} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.getNodesList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); +proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; + /** - * @param {!Array} value - * @return {!proto.aggregator.Task} returns this + * optional string memo = 6; + * @return {string} */ -proto.aggregator.Task.prototype.setNodesList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); +proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; + /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * @param {string} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.addNodes = function (opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 5, - opt_value, - proto.aggregator.TaskAction, - opt_index - ); +proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.Task} returns this + * repeated TaskNode nodes = 7; + * @return {!Array} */ -proto.aggregator.Task.prototype.clearNodesList = function () { - return this.setNodesList([]); +proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7)); }; + /** - * optional int64 start_at = 6; - * @return {number} - */ -proto.aggregator.Task.prototype.getStartAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; + /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @param {!proto.aggregator.TaskNode=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.Task.prototype.setStartAt = function (value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); }; + /** - * optional int64 expired_at = 7; - * @return {number} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.getExpiredAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); }; + /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * repeated TaskEdge edges = 8; + * @return {!Array} */ -proto.aggregator.Task.prototype.setExpiredAt = function (value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8)); }; + /** - * optional string memo = 8; - * @return {string} - */ -proto.aggregator.Task.prototype.getMemo = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); }; + /** - * @param {string} value - * @return {!proto.aggregator.Task} returns this + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.Task.prototype.setMemo = function (value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); }; + /** - * optional int64 completed_at = 9; - * @return {number} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.getCompletedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.Task.prototype.setCompletedAt = function (value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); }; + /** - * optional TaskStatus status = 10; - * @return {!proto.aggregator.TaskStatus} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CreateTaskResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.prototype.getStatus = function () { - return /** @type {!proto.aggregator.TaskStatus} */ ( - jspb.Message.getFieldWithDefault(this, 10, 0) - ); +proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + /** - * @param {!proto.aggregator.TaskStatus} value - * @return {!proto.aggregator.Task} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.CreateTaskResp} */ -proto.aggregator.Task.prototype.setStatus = function (value) { - return jspb.Message.setProto3EnumField(this, 10, value); +proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateTaskResp; + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); }; + /** - * optional bool repeatable = 11; - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.CreateTaskResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.CreateTaskResp} */ -proto.aggregator.Task.prototype.getRepeatable = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 11, false) - ); +proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** - * @param {boolean} value - * @return {!proto.aggregator.Task} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.Task.prototype.setRepeatable = function (value) { - return jspb.Message.setProto3BooleanField(this, 11, value); +proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * repeated Execution executions = 12; - * @return {!Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.CreateTaskResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.prototype.getExecutionsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) - ); +proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** - * @param {!Array} value - * @return {!proto.aggregator.Task} returns this + * optional string id = 1; + * @return {string} */ -proto.aggregator.Task.prototype.setExecutionsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); +proto.aggregator.CreateTaskResp.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** - * @param {!proto.aggregator.Execution=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.Execution} + * @param {string} value + * @return {!proto.aggregator.CreateTaskResp} returns this */ -proto.aggregator.Task.prototype.addExecutions = function ( - opt_value, - opt_index -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 12, - opt_value, - proto.aggregator.Execution, - opt_index - ); +proto.aggregator.CreateTaskResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.Task} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.Task.prototype.clearExecutionsList = function () { - return this.setExecutionsList([]); +proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.NonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.CreateTaskReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); +proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, "") }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.CreateTaskReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CreateTaskReq.toObject = function (includeInstance, msg) { - var f, - obj = { - trigger: - (f = msg.getTrigger()) && - proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CreateTaskReq} + * @return {!proto.aggregator.NonceRequest} */ -proto.aggregator.CreateTaskReq.deserializeBinary = function (bytes) { +proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.NonceRequest; + return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CreateTaskReq} msg The message object to deserialize into. + * @param {!proto.aggregator.NonceRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CreateTaskReq} + * @return {!proto.aggregator.NonceRequest} */ -proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); - msg.setTrigger(value); - break; - case 2: - var value = new proto.aggregator.TaskAction(); - reader.readMessage( - value, - proto.aggregator.TaskAction.deserializeBinaryFromReader - ); - msg.addActions(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartAt(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiredAt(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CreateTaskReq.prototype.serializeBinary = function () { +proto.aggregator.NonceRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); + proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CreateTaskReq} message + * @param {!proto.aggregator.NonceRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getActionsList(); + f = message.getOwner(); if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 1, + f ); } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64(3, f); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64(4, f); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString(5, f); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool(6, f); - } }; -/** - * optional TaskTrigger trigger = 1; - * @return {?proto.aggregator.TaskTrigger} - */ -proto.aggregator.CreateTaskReq.prototype.getTrigger = function () { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) - ); -}; /** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * optional string owner = 1; + * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.setTrigger = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.aggregator.NonceRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.CreateTaskReq} returns this - */ -proto.aggregator.CreateTaskReq.prototype.clearTrigger = function () { - return this.setTrigger(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.NonceRequest} returns this */ -proto.aggregator.CreateTaskReq.prototype.hasTrigger = function () { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.NonceRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * repeated TaskAction actions = 2; - * @return {!Array} - */ -proto.aggregator.CreateTaskReq.prototype.getActionsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); -}; -/** - * @param {!Array} value - * @return {!proto.aggregator.CreateTaskReq} returns this - */ -proto.aggregator.CreateTaskReq.prototype.setActionsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.CreateTaskReq.prototype.addActions = function ( - opt_value, - opt_index -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.TaskAction, - opt_index - ); +proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.CreateTaskReq} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.NonceResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.clearActionsList = function () { - return this.setActionsList([]); +proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { + var f, obj = { + nonce: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + /** - * optional int64 start_at = 3; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.NonceResp} */ -proto.aggregator.CreateTaskReq.prototype.getStartAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.aggregator.NonceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceResp; + return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); }; + /** - * @param {number} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.NonceResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.NonceResp} */ -proto.aggregator.CreateTaskReq.prototype.setStartAt = function (value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNonce(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** - * optional int64 expired_at = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.aggregator.NonceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * @param {number} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.NonceResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function (value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNonce(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** - * optional string memo = 5; + * optional string nonce = 1; * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.getMemo = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.aggregator.NonceResp.prototype.getNonce = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * @return {!proto.aggregator.NonceResp} returns this */ -proto.aggregator.CreateTaskReq.prototype.setMemo = function (value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.aggregator.NonceResp.prototype.setNonce = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bool repeatable = 6; - * @return {boolean} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.CreateTaskReq.prototype.getRepeatable = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 6, false) - ); +proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); }; + /** - * @param {boolean} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.AddressRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.setRepeatable = function (value) { - return jspb.Message.setProto3BooleanField(this, 6, value); -}; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.CreateTaskResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); +proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { + var f, obj = { + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.CreateTaskResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CreateTaskResp.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CreateTaskResp} + * @return {!proto.aggregator.AddressRequest} */ -proto.aggregator.CreateTaskResp.deserializeBinary = function (bytes) { +proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.AddressRequest; + return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CreateTaskResp} msg The message object to deserialize into. + * @param {!proto.aggregator.AddressRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CreateTaskResp} + * @return {!proto.aggregator.AddressRequest} */ -proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFactory(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CreateTaskResp.prototype.serializeBinary = function () { +proto.aggregator.AddressRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); + proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CreateTaskResp} message + * @param {!proto.aggregator.AddressRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getFactory(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); } }; + /** - * optional string id = 1; + * optional string factory = 1; * @return {string} */ -proto.aggregator.CreateTaskResp.prototype.getId = function () { +proto.aggregator.AddressRequest.prototype.getFactory = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.CreateTaskResp} returns this + * @return {!proto.aggregator.AddressRequest} returns this */ -proto.aggregator.CreateTaskResp.prototype.setId = function (value) { +proto.aggregator.AddressRequest.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + +/** + * optional string salt = 2; + * @return {string} + */ +proto.aggregator.AddressRequest.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.AddressRequest} returns this + */ +proto.aggregator.AddressRequest.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.NonceRequest.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.NonceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.NonceRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.SmartWallet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.NonceRequest} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceRequest.deserializeBinary = function (bytes) { +proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceRequest(); - return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SmartWallet; + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.NonceRequest} msg The message object to deserialize into. + * @param {!proto.aggregator.SmartWallet} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.NonceRequest} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceRequest.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFactory(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.NonceRequest.prototype.serializeBinary = function () { +proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.NonceRequest} message + * @param {!proto.aggregator.SmartWallet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceRequest.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 3, + f + ); } }; + /** - * optional string owner = 1; + * optional string address = 1; * @return {string} */ -proto.aggregator.NonceRequest.prototype.getOwner = function () { +proto.aggregator.SmartWallet.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.NonceRequest} returns this + * @return {!proto.aggregator.SmartWallet} returns this */ -proto.aggregator.NonceRequest.prototype.setOwner = function (value) { +proto.aggregator.SmartWallet.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + +/** + * optional string salt = 2; + * @return {string} + */ +proto.aggregator.SmartWallet.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.SmartWallet} returns this + */ +proto.aggregator.SmartWallet.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string factory = 3; + * @return {string} + */ +proto.aggregator.SmartWallet.prototype.getFactory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.SmartWallet} returns this + */ +proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.AddressResp.repeatedFields_ = [1]; + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.NonceResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.NonceResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.NonceResp.toObject = function (includeInstance, msg) { - var f, - obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.AddressResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList(msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, includeInstance) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.NonceResp} + * @return {!proto.aggregator.AddressResp} */ -proto.aggregator.NonceResp.deserializeBinary = function (bytes) { +proto.aggregator.AddressResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceResp(); - return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.AddressResp; + return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.NonceResp} msg The message object to deserialize into. + * @param {!proto.aggregator.AddressResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.NonceResp} + * @return {!proto.aggregator.AddressResp} */ -proto.aggregator.NonceResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = new proto.aggregator.SmartWallet; + reader.readMessage(value,proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.NonceResp.prototype.serializeBinary = function () { +proto.aggregator.AddressResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.NonceResp} message + * @param {!proto.aggregator.AddressResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNonce(); + f = message.getWalletsList(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); } }; + /** - * optional string nonce = 1; - * @return {string} + * repeated SmartWallet wallets = 1; + * @return {!Array} */ -proto.aggregator.NonceResp.prototype.getNonce = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.AddressResp.prototype.getWalletsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1)); }; + /** - * @param {string} value - * @return {!proto.aggregator.NonceResp} returns this + * @param {!Array} value + * @return {!proto.aggregator.AddressResp} returns this +*/ +proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.aggregator.SmartWallet=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceResp.prototype.setNonce = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.AddressResp} returns this + */ +proto.aggregator.AddressResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.AddressRequest.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.AddressRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.AddressRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.ListTasksReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.AddressRequest} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.AddressRequest.deserializeBinary = function (bytes) { +proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.ListTasksReq; + return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.AddressRequest} msg The message object to deserialize into. + * @param {!proto.aggregator.ListTasksReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.AddressRequest} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.AddressRequest.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressRequest.prototype.serializeBinary = function () { +proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.AddressRequest} message + * @param {!proto.aggregator.ListTasksReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressRequest.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; + /** - * optional string owner = 1; + * optional string smart_wallet_address = 1; * @return {string} */ -proto.aggregator.AddressRequest.prototype.getOwner = function () { +proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.AddressRequest} returns this + * @return {!proto.aggregator.ListTasksReq} returns this */ -proto.aggregator.AddressRequest.prototype.setOwner = function (value) { +proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.ListTasksResp.repeatedFields_ = [1]; + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.AddressResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.AddressResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.AddressResp.toObject = function (includeInstance, msg) { - var f, - obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.ListTasksResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + tasksList: jspb.Message.toObjectList(msg.getTasksList(), + proto.aggregator.Task.toObject, includeInstance) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.AddressResp} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.AddressResp.deserializeBinary = function (bytes) { +proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListTasksResp; + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.AddressResp} msg The message object to deserialize into. + * @param {!proto.aggregator.ListTasksResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.AddressResp} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.AddressResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSmartAccountAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = new proto.aggregator.Task; + reader.readMessage(value,proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressResp.prototype.serializeBinary = function () { +proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.AddressResp} message + * @param {!proto.aggregator.ListTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getNonce(); + f = message.getTasksList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); } }; + /** - * optional string smart_account_address = 1; - * @return {string} + * repeated Task tasks = 1; + * @return {!Array} */ -proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.ListTasksResp.prototype.getTasksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1)); }; + /** - * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this - */ -proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function ( - value -) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {!Array} value + * @return {!proto.aggregator.ListTasksResp} returns this +*/ +proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; + /** - * optional string nonce = 2; - * @return {string} + * @param {!proto.aggregator.Task=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Task} */ -proto.aggregator.AddressResp.prototype.getNonce = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; + /** - * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.ListTasksResp} returns this */ -proto.aggregator.AddressResp.prototype.setNonce = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { + return this.setTasksList([]); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ListTasksReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ListTasksReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ListTasksReq.toObject = function (includeInstance, msg) { - var f, - obj = {}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.GetKeyReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: jspb.Message.getFieldWithDefault(msg, 3, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksReq} + * @return {!proto.aggregator.GetKeyReq} */ -proto.aggregator.ListTasksReq.deserializeBinary = function (bytes) { +proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.GetKeyReq; + return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ListTasksReq} msg The message object to deserialize into. + * @param {!proto.aggregator.GetKeyReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksReq} + * @return {!proto.aggregator.GetKeyReq} */ -proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksReq.prototype.serializeBinary = function () { +proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksReq} message + * @param {!proto.aggregator.GetKeyReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * optional string owner = 1; + * @return {string} */ -proto.aggregator.ListTasksResp.repeatedFields_ = [1]; +proto.aggregator.GetKeyReq.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ListTasksResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); - }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ListTasksResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ListTasksResp.toObject = function (includeInstance, msg) { - var f, - obj = { - tasksList: jspb.Message.toObjectList( - msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, - includeInstance - ), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; -} +/** + * @param {string} value + * @return {!proto.aggregator.GetKeyReq} returns this + */ +proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksResp} + * optional int64 expired_at = 2; + * @return {number} */ -proto.aggregator.ListTasksResp.deserializeBinary = function (bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader( - msg, - reader - ); +proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.ListTasksResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksResp} + * @param {number} value + * @return {!proto.aggregator.GetKeyReq} returns this */ -proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function ( - msg, - reader -) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage( - value, - proto.aggregator.ListTasksResp.TaskItemResp - .deserializeBinaryFromReader - ); - msg.addTasks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; + /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string signature = 3; + * @return {string} */ -proto.aggregator.ListTasksResp.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.GetKeyReq.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.aggregator.GetKeyReq} returns this */ -proto.aggregator.ListTasksResp.serializeBinaryToWriter = function ( - message, - writer -) { - var f = undefined; - f = message.getTasksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter - ); - } +proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject( - opt_includeInstance, - this - ); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.ListTasksResp.TaskItemResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function ( - includeInstance, - msg - ) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.KeyResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * @return {!proto.aggregator.KeyResp} */ -proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function ( - bytes -) { +proto.aggregator.KeyResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.KeyResp; + return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ListTasksResp.TaskItemResp} msg The message object to deserialize into. + * @param {!proto.aggregator.KeyResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * @return {!proto.aggregator.KeyResp} */ -proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = - function (msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {!proto.aggregator.TaskStatus} */ ( - reader.readEnum() - ); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } +proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; - }; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; +proto.aggregator.KeyResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksResp.TaskItemResp} message + * @param {!proto.aggregator.KeyResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getKey(); if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum(2, f); + writer.writeString( + 1, + f + ); } }; + /** - * optional string id = 1; + * optional string key = 1; * @return {string} */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function () { +proto.aggregator.KeyResp.prototype.getKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} returns this + * @return {!proto.aggregator.KeyResp} returns this */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function (value) { +proto.aggregator.KeyResp.prototype.setKey = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional TaskStatus status = 2; - * @return {!proto.aggregator.TaskStatus} - */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function () { - return /** @type {!proto.aggregator.TaskStatus} */ ( - jspb.Message.getFieldWithDefault(this, 2, 0) - ); -}; -/** - * @param {!proto.aggregator.TaskStatus} value - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} returns this - */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function ( - value -) { - return jspb.Message.setProto3EnumField(this, 2, value); -}; /** - * repeated TaskItemResp tasks = 1; - * @return {!Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.ListTasksResp.prototype.getTasksList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ListTasksResp.TaskItemResp, - 1 - ) - ); -}; +proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; -/** - * @param {!Array} value - * @return {!proto.aggregator.ListTasksResp} returns this - */ -proto.aggregator.ListTasksResp.prototype.setTasksList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.aggregator.ListTasksResp.TaskItemResp=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.ListTasksResp.prototype.addTasks = function ( - opt_value, - opt_index -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.aggregator.ListTasksResp.TaskItemResp, - opt_index - ); +proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.ListTasksResp} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.UpdateChecksReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.prototype.clearTasksList = function () { - return this.setTasksList([]); -}; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.GetKeyReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); +proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, ""), + idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.GetKeyReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.GetKeyReq.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.GetKeyReq} + * @return {!proto.aggregator.UpdateChecksReq} */ -proto.aggregator.GetKeyReq.deserializeBinary = function (bytes) { +proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GetKeyReq(); - return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.UpdateChecksReq; + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.GetKeyReq} msg The message object to deserialize into. + * @param {!proto.aggregator.UpdateChecksReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.GetKeyReq} + * @return {!proto.aggregator.UpdateChecksReq} */ -proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiredAt(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.addId(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.GetKeyReq.prototype.serializeBinary = function () { +proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.GetKeyReq} message + * @param {!proto.aggregator.UpdateChecksReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GetKeyReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getAddress(); if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64(2, f); + writer.writeString( + 1, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); + } + f = message.getIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); } }; + +/** + * optional string address = 1; + * @return {string} + */ +proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.UpdateChecksReq} returns this + */ +proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + /** - * optional string owner = 1; + * optional string signature = 2; * @return {string} */ -proto.aggregator.GetKeyReq.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.GetKeyReq} returns this + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * optional int64 expired_at = 2; - * @return {number} + * repeated string id = 3; + * @return {!Array} */ -proto.aggregator.GetKeyReq.prototype.getExpiredAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); }; + /** - * @param {number} value - * @return {!proto.aggregator.GetKeyReq} returns this + * @param {!Array} value + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setExpiredAt = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); }; + /** - * optional string signature = 3; - * @return {string} + * @param {string} value + * @param {number=} opt_index + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.getSignature = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; + /** - * @param {string} value - * @return {!proto.aggregator.GetKeyReq} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setSignature = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); }; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.KeyResp.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.KeyResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.KeyResp.toObject = function (includeInstance, msg) { - var f, - obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.UpdateChecksResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.KeyResp} + * @return {!proto.aggregator.UpdateChecksResp} */ -proto.aggregator.KeyResp.deserializeBinary = function (bytes) { +proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.KeyResp(); - return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.UpdateChecksResp; + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.KeyResp} msg The message object to deserialize into. + * @param {!proto.aggregator.UpdateChecksResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.KeyResp} + * @return {!proto.aggregator.UpdateChecksResp} */ -proto.aggregator.KeyResp.deserializeBinaryFromReader = function (msg, reader) { +proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKey(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.KeyResp.prototype.serializeBinary = function () { +proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.KeyResp} message + * @param {!proto.aggregator.UpdateChecksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.KeyResp.serializeBinaryToWriter = function (message, writer) { +proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKey(); - if (f.length > 0) { - writer.writeString(1, f); + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); } }; + /** - * optional string key = 1; - * @return {string} + * optional google.protobuf.Timestamp updated_at = 1; + * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.KeyResp.prototype.getKey = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); }; + /** - * @param {string} value - * @return {!proto.aggregator.KeyResp} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.aggregator.UpdateChecksResp} returns this +*/ +proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.UpdateChecksResp} returns this */ -proto.aggregator.KeyResp.prototype.setKey = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; +proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.UpdateChecksReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); - }; +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.UpdateChecksReq.toObject = function (includeInstance, msg) { - var f, - obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - idList: - (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CreateWalletReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UpdateChecksReq} + * @return {!proto.aggregator.CreateWalletReq} */ -proto.aggregator.UpdateChecksReq.deserializeBinary = function (bytes) { +proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.CreateWalletReq; + return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.UpdateChecksReq} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateWalletReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UpdateChecksReq} + * @return {!proto.aggregator.CreateWalletReq} */ -proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addId(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function () { +proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UpdateChecksReq} message + * @param {!proto.aggregator.CreateWalletReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } - f = message.getIdList(); + f = message.getFactoryAddress(); if (f.length > 0) { - writer.writeRepeatedString(3, f); + writer.writeString( + 2, + f + ); } }; + /** - * optional string address = 1; + * optional string salt = 1; * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getAddress = function () { +proto.aggregator.CreateWalletReq.prototype.getSalt = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @return {!proto.aggregator.CreateWalletReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setAddress = function (value) { +proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string signature = 2; + * optional string factory_address = 2; * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getSignature = function () { +proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @return {!proto.aggregator.CreateWalletReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setSignature = function (value) { +proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * repeated string id = 3; - * @return {!Array} - */ -proto.aggregator.UpdateChecksReq.prototype.getIdList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; -/** - * @param {!Array} value - * @return {!proto.aggregator.UpdateChecksReq} returns this - */ -proto.aggregator.UpdateChecksReq.prototype.setIdList = function (value) { - return jspb.Message.setField(this, 3, value || []); -}; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.UpdateChecksReq} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.UpdateChecksReq.prototype.addId = function (value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.UpdateChecksReq} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CreateWalletResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.prototype.clearIdList = function () { - return this.setIdList([]); -}; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.UpdateChecksResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.UpdateChecksResp.toObject( - opt_includeInstance, - this - ); +proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, "") }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.UpdateChecksResp.toObject = function (includeInstance, msg) { - var f, - obj = { - updatedAt: - (f = msg.getUpdatedAt()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UpdateChecksResp} + * @return {!proto.aggregator.CreateWalletResp} */ -proto.aggregator.UpdateChecksResp.deserializeBinary = function (bytes) { +proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.CreateWalletResp; + return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.UpdateChecksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateWalletResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UpdateChecksResp} + * @return {!proto.aggregator.CreateWalletResp} */ -proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function () { +proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UpdateChecksResp} message + * @param {!proto.aggregator.CreateWalletResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + f ); } }; -/** - * optional google.protobuf.Timestamp updated_at = 1; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function () { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) - ); -}; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.aggregator.UpdateChecksResp} returns this + * optional string address = 1; + * @return {string} */ -proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.UpdateChecksResp} returns this - */ -proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function () { - return this.setUpdatedAt(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this */ -proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function () { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** * @enum {number} */ proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2, + MANUALTRIGGER: 0, + FIXEDEPOCHTRIGGER: 1, + CRONTRIGGER: 2, + BLOCKTRIGGER: 3, + EVENTTRIGGER: 4 }; /** * @enum {number} */ -proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5, +proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1000, + STORAGEUNAVAILABLE: 2000, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6000, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7000, + TASKDATAMISSINGERROR: 7001 }; /** @@ -7476,37 +8996,28 @@ proto.aggregator.TaskStatus = { COMPLETED: 1, FAILED: 2, CANCELED: 3, - EXECUTING: 4, + EXECUTING: 4 }; /** * @enum {number} */ proto.aggregator.CustomCodeType = { - JAVASCRIPT: 0, + JAVASCRIPT: 0 }; -goog.object.extend(exports, proto.aggregator); +/** + * @enum {number} + */ +proto.aggregator.TaskType = { + ETHTRANSFERTASK: 0, + CONTRACTWRITETASK: 1, + CONTRACTREADTASK: 2, + GRAPHQLDATAQUERYTASK: 3, + RESTAPITASK: 4, + BRANCHTASK: 5, + FILTERTASK: 6, + CUSTOMCODETASK: 7 +}; -// !Important: These type definitions must be exported; otherwise they will be undefined in the SDK -export const { - Task, - CreateTaskReq, - CreateTaskResp, - GetKeyReq, - KeyResp, - UpdateChecksReq, - UpdateChecksResp, - AddressResp, - AddressRequest, - ListTasksReq, - ListTasksResp, - TaskTrigger, - TriggerType, - ExpressionCondition, - TaskAction, - ActionType, - ContractExecution, - TaskType, - UUID, -} = proto.aggregator; +goog.object.extend(exports, proto.aggregator); diff --git a/src/index.ts b/src/index.ts index 697feb7..bcbec82 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,6 +28,8 @@ class BaseClient { readonly rpcClient; protected metadata: Metadata; + protected authKey?: string; + constructor(opts: ClientOption) { this.endpoint = opts.endpoint; this.rpcClient = new AggregatorClient( @@ -54,21 +56,26 @@ class BaseClient { } } + // When using the APIkey, depends on scope of the key, it may have access to one ore more account async authWithAPIKey( + address: string, apiKey: string, expiredAtEpoch: number ): Promise { // Create a new GetKeyReq message const request = new avs_pb.GetKeyReq(); - request.setOwner(""); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); - const result: avs_pb.KeyResp = await this._callRPC< + // when exchanging the key, we don't set the token yet + const result: avs_pb.KeyResp = await this._callAnonRPC< avs_pb.KeyResp, avs_pb.GetKeyReq >("getKey", request); + this.authKey = result.getKey(); + return { authKey: result.getKey() }; } @@ -84,11 +91,13 @@ class BaseClient { request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); - let result = await this._callRPC( + // when exchanging the key, we don't set the token yet + let result = await this._callAnonRPC( "getKey", request ); - + this.authKey = result.getKey(); + return { authKey: result.getKey() }; } @@ -100,10 +109,10 @@ class BaseClient { // Clone the existing metadata from the client const metadata = _.cloneDeep(this.metadata); - // Add the auth key to the metadata as a header - if (options?.authKey) { - metadata.set(AUTH_KEY_HEADER, options.authKey); + if (!this.authKey) { + throw new Error("Not authenticated yet"); } + metadata.set(AUTH_KEY_HEADER, this.authKey); return new Promise((resolve, reject) => { (this.rpcClient as any)[method].bind(this.rpcClient)( @@ -116,6 +125,23 @@ class BaseClient { ); }); } + + protected _callAnonRPC( + method: string, + request: TRequest | any, + options?: RequestOptions + ): Promise { + return new Promise((resolve, reject) => { + (this.rpcClient as any)[method].bind(this.rpcClient)( + request, + this.metadata, + (error: any, response: TResponse) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } } export default class Client extends BaseClient { @@ -123,21 +149,18 @@ export default class Client extends BaseClient { super(config); } - async getAddresses( - address: string, - { authKey }: { authKey: string } + async listSmartWallets( ): Promise { const request = new avs_pb.AddressRequest(); - request.setOwner(address); const result = await this._callRPC< avs_pb.AddressResp, avs_pb.AddressRequest - >("getSmartAccountAddress", request, { authKey }); + >("getSmartAccountAddress", request); return { owner: address, - smart_account_address: result.getSmartAccountAddress(), + wallets: result.getWalletsList(), }; } @@ -150,8 +173,7 @@ export default class Client extends BaseClient { address: string; tokenContract: string; oracleContract: string; - }, - { authKey }: { authKey: string } + } ): Promise { const trigger = new avs_pb.TaskTrigger(); trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); @@ -196,8 +218,7 @@ export default class Client extends BaseClient { } async listTasks( - address: string, - { authKey }: { authKey: string } + address: string ): Promise { const request = new avs_pb.ListTasksReq(); @@ -225,7 +246,6 @@ export default class Client extends BaseClient { // Right now we simply return the original object from the server async getTask( id: string, - { authKey }: { authKey: string } ): Promise { const request = new avs_pb.UUID(); request.setBytes(id); @@ -234,15 +254,13 @@ export default class Client extends BaseClient { const result = await this._callRPC( "getTask", request, - { authKey } ); return new Task(result); } async cancelTask( - id: string, - { authKey }: { authKey: string } + id: string ): Promise { const request = new avs_pb.UUID(); request.setBytes(id); @@ -250,7 +268,6 @@ export default class Client extends BaseClient { const result = await this._callRPC( "cancelTask", request, - { authKey } ); return { @@ -259,8 +276,7 @@ export default class Client extends BaseClient { } async deleteTask( - id: string, - { authKey }: { authKey: string } + id: string ): Promise { const request = new avs_pb.UUID(); request.setBytes(id); @@ -268,7 +284,6 @@ export default class Client extends BaseClient { const result = await this._callRPC( "deleteTask", request, - { authKey } ); return { diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 5987e4e..f752608 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -1,5 +1,5 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src/index"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; @@ -40,14 +40,14 @@ describe("Client E2E Tests", () => { }); test("should authenticate and return valid JWT token when using API key", async () => { - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(walletAddress, TEST_API_KEY, EXPIRED_AT); expect(res).toBeDefined(); - expect(res).toHaveProperty("key"); - expect(typeof res.key).toBe("string"); + expect(res).toHaveProperty("authKey"); + expect(typeof res.authKey).toBe("string"); // Check if the key is a valid JWT token - const keyParts = res.key.split("."); + const keyParts = res.authKey.split("."); expect(keyParts).toHaveLength(3); // The format of the parsed key payload is @@ -80,11 +80,11 @@ describe("Client E2E Tests", () => { ); expect(res).toBeDefined(); - expect(res).toHaveProperty("key"); - expect(typeof res.key).toBe("string"); + expect(res).toHaveProperty("authKey"); + expect(typeof res.authKey).toBe("string"); // Check if the key is a valid JWT token - const keyParts = res.key.split("."); + const keyParts = res.authKey.split("."); expect(keyParts).toHaveLength(3); // Decode the base64 token and check the payload @@ -115,19 +115,25 @@ describe("Client E2E Tests", () => { ); } - await client.authWithSignature(walletAddress, signature, EXPIRED_AT); + console.log("should hit here", "dauhu", walletAddress, signature, EXPIRED_AT); + let a = await client.authWithSignature(walletAddress, signature, EXPIRED_AT); + console.log("should hit here", "dauhu", a); }); - test("getAddresses", async () => { - const result = await client.getAddresses(walletAddress); + test("listSmartWallets", async () => { + const result = await client.listSmartWallets(walletAddress); // Example result: // { // address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', // smart_account_address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', // } + console.log("dauhu", result); expect(result).toBeDefined(); - expect(result.owner).toMatch(/^0x[a-fA-F0-9]{40}$/); // Ethereum address format - expect(result.smart_account_address).toMatch(/^0x[a-fA-F0-9]{40}$/); + expect(result.wallets).toBeDefined(); + const total = result.wallets.length; + expect(total).toBeGreaterThan(1); + + expect(result.wallet[s0].smart_account_address).toMatch(/^0x[a-fA-F0-9]{40}$/); }); test("createTask", async () => { diff --git a/tests/utils.ts b/tests/utils.ts index 544bde7..b3c0035 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -1,4 +1,4 @@ -import { getKeyRequestMessage } from "../dist/index.js"; +import { getKeyRequestMessage } from "../src"; import { ethers } from "ethers"; import _ from "lodash"; // Get wallet address from private key From 31fb659952e6938e596e4fe71512814bba56ab07 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 13 Nov 2024 23:53:18 -0800 Subject: [PATCH 02/51] add create wallet test --- src/index.ts | 29 +++++++++++++++++++++++++++-- tests/basic.test.ts | 15 +++++++++------ 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/index.ts b/src/index.ts index bcbec82..c2cf05c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,6 +29,8 @@ class BaseClient { readonly rpcClient; protected metadata: Metadata; protected authKey?: string; + // owner is the EOA user wallet. It's the underlying user who created smart wallets and create tasks + protected owner?: string; constructor(opts: ClientOption) { this.endpoint = opts.endpoint; @@ -75,6 +77,8 @@ class BaseClient { >("getKey", request); this.authKey = result.getKey(); + // when using an API key, the key can authenticate on behalf of other users as long as the user granted the permission + this.owner = address; return { authKey: result.getKey() }; } @@ -96,7 +100,10 @@ class BaseClient { "getKey", request ); + + // succesfully authenticated, initialized trusted information for subsequent api call on this client this.authKey = result.getKey(); + this.owner = address; return { authKey: result.getKey() }; } @@ -159,8 +166,26 @@ export default class Client extends BaseClient { >("getSmartAccountAddress", request); return { - owner: address, - wallets: result.getWalletsList(), + wallets: result.getWalletsList().map(item => item.toObject()), + }; + } + + async createWallet( + salt: string, factoryAddress?: string + ): Promise { + const request = new avs_pb.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + + const result = await this._callRPC< + avs_pb.CreateWalletReq, + avs_pb.CreateWalletResp + >("createWallet", request); + + return { + address: result.getAddress(), }; } diff --git a/tests/basic.test.ts b/tests/basic.test.ts index f752608..1984a43 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -115,9 +115,12 @@ describe("Client E2E Tests", () => { ); } - console.log("should hit here", "dauhu", walletAddress, signature, EXPIRED_AT); let a = await client.authWithSignature(walletAddress, signature, EXPIRED_AT); - console.log("should hit here", "dauhu", a); + }); + + test("createWallet", async () => { + const result = await client.createWallet("123"); + expect(result?.address).toEqual("0x2Ca3B219f7A22185693D10051EeD9C29EC3e8f8e"); }); test("listSmartWallets", async () => { @@ -127,13 +130,13 @@ describe("Client E2E Tests", () => { // address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', // smart_account_address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', // } - console.log("dauhu", result); expect(result).toBeDefined(); expect(result.wallets).toBeDefined(); - const total = result.wallets.length; - expect(total).toBeGreaterThan(1); + expect(result.wallets.length).toBeGreaterThanOrEqual(1); - expect(result.wallet[s0].smart_account_address).toMatch(/^0x[a-fA-F0-9]{40}$/); + expect(result.wallets[0].address).toEqual("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41"); + expect(result.wallets[0].salt).toEqual("0"); + expect(result.wallets[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); }); test("createTask", async () => { From b178ec529401faf88bb0730ec5ece3ac73e41fe1 Mon Sep 17 00:00:00 2001 From: Vinh Date: Thu, 14 Nov 2024 00:53:48 -0800 Subject: [PATCH 03/51] run test with local docker --- .github/workflows/run-test-on-pr.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 685e99d..237c453 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -14,7 +14,7 @@ jobs: TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} - ENDPOINT: ${{ vars.ENDPOINT }} + ENDPOINT: localhost:2206 steps: - name: Checkout repository @@ -35,6 +35,10 @@ jobs: echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" echo "ENDPOINT: $ENDPOINT" echo "TEST_PRIVATE_KEY is set: ${{ env.TEST_PRIVATE_KEY != '' }}" - + + - name: Bring up docker compose + run: | + docker compose up -d + - name: Run tests run: npm test \ No newline at end of file From 5ceffcae36e0932479184b01c4a094b57ee7ee38 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 11:02:34 -0800 Subject: [PATCH 04/51] SDK is 100% working --- grpc_codegen/avs.proto | 74 +- grpc_codegen/avs_grpc_pb.d.ts | 94 +- grpc_codegen/avs_grpc_pb.js | 112 +- grpc_codegen/avs_pb.d.ts | 171 +- grpc_codegen/avs_pb.js | 678 ++-- grpc_codegen/compiled.d.ts | 5536 +++++++++++++++++++++++++++++++++ src/builder.ts | 34 + src/index.ts | 197 +- src/task.ts | 23 +- src/types.ts | 7 +- tests/basic.test.ts | 129 +- 11 files changed, 6253 insertions(+), 802 deletions(-) create mode 100644 grpc_codegen/compiled.d.ts create mode 100644 src/builder.ts diff --git a/grpc_codegen/avs.proto b/grpc_codegen/avs.proto index 8ca04e9..7b4fb2a 100644 --- a/grpc_codegen/avs.proto +++ b/grpc_codegen/avs.proto @@ -6,8 +6,8 @@ option go_package = "./avsproto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -message UUID { - string bytes = 1; +message IdReq { + string id = 1; } message Checkin { @@ -74,9 +74,7 @@ message EventCondition { } message TaskTrigger { - TriggerType trigger_type = 1; - - oneof trigger_condition { + oneof trigger_type { bool manual = 2; // run at a specific epoch, name inspired by unix `at` utility @@ -144,7 +142,7 @@ message ContractWriteNode { string contract_abi = 3; } -message ContractQueryNode { +message ContractReadNode { string contract_address = 1; string call_data = 2; @@ -175,15 +173,14 @@ message CustomCodeNode { string source = 2; } -message ConditionJump { - string expression = 1; - string next = 2; +message Condition { + string id = 1; + string type = 2; + string expression = 3; } message BranchNode { - ConditionJump if = 1; - repeated ConditionJump elseIfs = 2; - ConditionJump else = 3; + repeated Condition conditions = 1; } message FilterNode { @@ -198,38 +195,12 @@ message TaskEdge { string target = 3 ; } -// TaskType represents what kind of work the task will perform -enum TaskType { - // Handle default/missing data - ETHTransferTask = 0; - - // Generic contract execution which can be used for: - // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc - // When executing a contract we need at least 2 things: - // - target contract address - // - the message to send to that contract - ContractWriteTask = 1; - ContractReadTask = 2; - - // GraphQL query. Note that a graphql can also be query as a HTTP API, but having its own graphql type make writing query easiser without passing all the data in post as parameter. - GraphQLDataQueryTask = 3; - - // Make call to a HTTP endpoint - RestAPITask = 4; - - // CustomCode allow to run arbitraty JavaScript. - BranchTask = 5; - FilterTask = 6; - CustomCodeTask = 7; -} - message TaskNode { - TaskType node_type = 1; string id = 2; string name = 3; // based on node_type one and only one of these field are set - oneof task_body { + oneof task_type { // Transfer eth require no calldata etc, just a destination address and an eth amount to be sent ETHTransferNode eth_transfer = 10; @@ -237,7 +208,7 @@ message TaskNode { // multicall to wrap many calls. in a contract write, we need to generate signature and send as userops. ContractWriteNode contract_write = 11; // read data fron a target contract - ContractQueryNode contract_read = 12; + ContractReadNode contract_read = 12; // Make call to a graphql endpoint GraphQLQueryNode graphql_data_query = 13; // Make call to a HTTP endpoint @@ -256,7 +227,7 @@ message Execution { } message Task { - UUID id = 1; + string id = 1; string owner = 2; string smart_wallet_address = 3; @@ -269,9 +240,8 @@ message Task { int64 completed_at = 8; - // repeatable means a task can continue to run even after the first execution. - // By default, recurring is false, task will only executed once. - bool recurring = 10; + // limit on how many time this task can run. Set to 0 will make it run unlimited until cancelling or reaching its expired time + int64 max_execution = 10; TaskStatus status = 9; TaskTrigger trigger = 4; @@ -312,7 +282,7 @@ message NonceResp { string nonce = 1; } -message AddressRequest { +message ListWalletReq { // filter out by factory address or salt // otherwise return all the wallet string factory = 1; @@ -325,7 +295,7 @@ message SmartWallet { string factory = 3; } -message AddressResp { +message ListWalletResp { repeated SmartWallet wallets = 1; } @@ -367,6 +337,8 @@ message CreateWalletReq { message CreateWalletResp { string address = 1; + string salt = 2; + string factory_address = 3; } service Aggregator { @@ -375,15 +347,15 @@ service Aggregator { // Smart Acccount rpc GetNonce(NonceRequest) returns (NonceResp) {}; - rpc GetSmartAccountAddress(AddressRequest) returns (AddressResp) {}; + rpc CreateWallet(CreateWalletReq) returns (CreateWalletResp) {}; + rpc ListWallets(ListWalletReq) returns (ListWalletResp) {}; // Task Management - rpc CreateWallet(CreateWalletReq) returns (CreateWalletResp) {}; rpc CreateTask(CreateTaskReq) returns (CreateTaskResp) {}; rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; - rpc GetTask(UUID) returns (Task) {}; - rpc CancelTask(UUID) returns (google.protobuf.BoolValue) {}; - rpc DeleteTask(UUID) returns (google.protobuf.BoolValue) {}; + rpc GetTask(IdReq) returns (Task) {}; + rpc CancelTask(IdReq) returns (google.protobuf.BoolValue) {}; + rpc DeleteTask(IdReq) returns (google.protobuf.BoolValue) {}; // Operator endpoint rpc Ping(Checkin) returns (CheckinResp) {}; diff --git a/grpc_codegen/avs_grpc_pb.d.ts b/grpc_codegen/avs_grpc_pb.d.ts index 3a80135..5e1ecdf 100644 --- a/grpc_codegen/avs_grpc_pb.d.ts +++ b/grpc_codegen/avs_grpc_pb.d.ts @@ -12,8 +12,8 @@ import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wr interface IAggregatorService extends grpc.ServiceDefinition { getKey: IAggregatorService_IGetKey; getNonce: IAggregatorService_IGetNonce; - getSmartAccountAddress: IAggregatorService_IGetSmartAccountAddress; createWallet: IAggregatorService_ICreateWallet; + listWallets: IAggregatorService_IListWallets; createTask: IAggregatorService_ICreateTask; listTasks: IAggregatorService_IListTasks; getTask: IAggregatorService_IGetTask; @@ -42,15 +42,6 @@ interface IAggregatorService_IGetNonce extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetSmartAccountAddress extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetSmartAccountAddress"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; -} interface IAggregatorService_ICreateWallet extends grpc.MethodDefinition { path: "/aggregator.Aggregator/CreateWallet"; requestStream: false; @@ -60,6 +51,15 @@ interface IAggregatorService_ICreateWallet extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } +interface IAggregatorService_IListWallets extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/ListWallets"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} interface IAggregatorService_ICreateTask extends grpc.MethodDefinition { path: "/aggregator.Aggregator/CreateTask"; requestStream: false; @@ -78,30 +78,30 @@ interface IAggregatorService_IListTasks extends grpc.MethodDefinition; responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetTask extends grpc.MethodDefinition { +interface IAggregatorService_IGetTask extends grpc.MethodDefinition { path: "/aggregator.Aggregator/GetTask"; requestStream: false; responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ICancelTask extends grpc.MethodDefinition { +interface IAggregatorService_ICancelTask extends grpc.MethodDefinition { path: "/aggregator.Aggregator/CancelTask"; requestStream: false; responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IDeleteTask extends grpc.MethodDefinition { +interface IAggregatorService_IDeleteTask extends grpc.MethodDefinition { path: "/aggregator.Aggregator/DeleteTask"; requestStream: false; responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; responseSerialize: grpc.serialize; responseDeserialize: grpc.deserialize; } @@ -138,13 +138,13 @@ export const AggregatorService: IAggregatorService; export interface IAggregatorServer extends grpc.UntypedServiceImplementation { getKey: grpc.handleUnaryCall; getNonce: grpc.handleUnaryCall; - getSmartAccountAddress: grpc.handleUnaryCall; createWallet: grpc.handleUnaryCall; + listWallets: grpc.handleUnaryCall; createTask: grpc.handleUnaryCall; listTasks: grpc.handleUnaryCall; - getTask: grpc.handleUnaryCall; - cancelTask: grpc.handleUnaryCall; - deleteTask: grpc.handleUnaryCall; + getTask: grpc.handleUnaryCall; + cancelTask: grpc.handleUnaryCall; + deleteTask: grpc.handleUnaryCall; ping: grpc.handleUnaryCall; syncTasks: grpc.handleServerStreamingCall; updateChecks: grpc.handleUnaryCall; @@ -157,27 +157,27 @@ export interface IAggregatorClient { getNonce(request: avs_pb.NonceRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; - getSmartAccountAddress(request: avs_pb.AddressRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; - getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; - getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; createWallet(request: avs_pb.CreateWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: avs_pb.ListWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; createTask(request: avs_pb.CreateTaskReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; listTasks(request: avs_pb.ListTasksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; - getTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; - getTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; - getTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; - cancelTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; ping(request: avs_pb.Checkin, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; ping(request: avs_pb.Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; ping(request: avs_pb.Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; @@ -196,27 +196,27 @@ export class AggregatorClient extends grpc.Client implements IAggregatorClient { public getNonce(request: avs_pb.NonceRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; public getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; public getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; - public getSmartAccountAddress(request: avs_pb.AddressRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; - public getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; - public getSmartAccountAddress(request: avs_pb.AddressRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.AddressResp) => void): grpc.ClientUnaryCall; public createWallet(request: avs_pb.CreateWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; public createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; public createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: avs_pb.ListWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; public createTask(request: avs_pb.CreateTaskReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; public createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; public createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; public listTasks(request: avs_pb.ListTasksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; public listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; public listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; - public getTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; - public getTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; - public getTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; - public cancelTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public cancelTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: avs_pb.UUID, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: avs_pb.UUID, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; public ping(request: avs_pb.Checkin, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; public ping(request: avs_pb.Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; public ping(request: avs_pb.Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; diff --git a/grpc_codegen/avs_grpc_pb.js b/grpc_codegen/avs_grpc_pb.js index ed3ab4b..25d3e95 100644 --- a/grpc_codegen/avs_grpc_pb.js +++ b/grpc_codegen/avs_grpc_pb.js @@ -6,28 +6,6 @@ var avs_pb = require('./avs_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); -function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb.AddressRequest)) { - throw new Error('Expected argument of type aggregator.AddressRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb.AddressResp)) { - throw new Error('Expected argument of type aggregator.AddressResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_aggregator_Checkin(arg) { if (!(arg instanceof avs_pb.Checkin)) { throw new Error('Expected argument of type aggregator.Checkin'); @@ -105,6 +83,17 @@ function deserialize_aggregator_GetKeyReq(buffer_arg) { return avs_pb.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb.IdReq)) { + throw new Error('Expected argument of type aggregator.IdReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_KeyResp(arg) { if (!(arg instanceof avs_pb.KeyResp)) { throw new Error('Expected argument of type aggregator.KeyResp'); @@ -138,6 +127,28 @@ function deserialize_aggregator_ListTasksResp(buffer_arg) { return avs_pb.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb.ListWalletReq)) { + throw new Error('Expected argument of type aggregator.ListWalletReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb.ListWalletResp)) { + throw new Error('Expected argument of type aggregator.ListWalletResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_NonceRequest(arg) { if (!(arg instanceof avs_pb.NonceRequest)) { throw new Error('Expected argument of type aggregator.NonceRequest'); @@ -193,17 +204,6 @@ function deserialize_aggregator_Task(buffer_arg) { return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb.UUID)) { - throw new Error('Expected argument of type aggregator.UUID'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb.UUID.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_aggregator_UpdateChecksReq(arg) { if (!(arg instanceof avs_pb.UpdateChecksReq)) { throw new Error('Expected argument of type aggregator.UpdateChecksReq'); @@ -263,19 +263,7 @@ getNonce: { responseSerialize: serialize_aggregator_NonceResp, responseDeserialize: deserialize_aggregator_NonceResp, }, - getSmartAccountAddress: { - path: '/aggregator.Aggregator/GetSmartAccountAddress', - requestStream: false, - responseStream: false, - requestType: avs_pb.AddressRequest, - responseType: avs_pb.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp, - }, - // Task Management -createWallet: { + createWallet: { path: '/aggregator.Aggregator/CreateWallet', requestStream: false, responseStream: false, @@ -286,7 +274,19 @@ createWallet: { responseSerialize: serialize_aggregator_CreateWalletResp, responseDeserialize: deserialize_aggregator_CreateWalletResp, }, - createTask: { + listWallets: { + path: '/aggregator.Aggregator/ListWallets', + requestStream: false, + responseStream: false, + requestType: avs_pb.ListWalletReq, + responseType: avs_pb.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp, + }, + // Task Management +createTask: { path: '/aggregator.Aggregator/CreateTask', requestStream: false, responseStream: false, @@ -312,10 +312,10 @@ createWallet: { path: '/aggregator.Aggregator/GetTask', requestStream: false, responseStream: false, - requestType: avs_pb.UUID, + requestType: avs_pb.IdReq, responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_aggregator_Task, responseDeserialize: deserialize_aggregator_Task, }, @@ -323,10 +323,10 @@ createWallet: { path: '/aggregator.Aggregator/CancelTask', requestStream: false, responseStream: false, - requestType: avs_pb.UUID, + requestType: avs_pb.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue, }, @@ -334,10 +334,10 @@ createWallet: { path: '/aggregator.Aggregator/DeleteTask', requestStream: false, responseStream: false, - requestType: avs_pb.UUID, + requestType: avs_pb.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue, }, diff --git a/grpc_codegen/avs_pb.d.ts b/grpc_codegen/avs_pb.d.ts index a3c6e54..e100d64 100644 --- a/grpc_codegen/avs_pb.d.ts +++ b/grpc_codegen/avs_pb.d.ts @@ -8,23 +8,23 @@ import * as jspb from "google-protobuf"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; -export class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; +export class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; } -export namespace UUID { +export namespace IdReq { export type AsObject = { - bytes: string, + id: string, } } @@ -237,8 +237,6 @@ export namespace EventCondition { } export class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; hasManual(): boolean; clearManual(): void; @@ -265,7 +263,7 @@ export class TaskTrigger extends jspb.Message { getEvent(): EventCondition | undefined; setEvent(value?: EventCondition): TaskTrigger; - getTriggerConditionCase(): TaskTrigger.TriggerConditionCase; + getTriggerTypeCase(): TaskTrigger.TriggerTypeCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TaskTrigger.AsObject; @@ -279,7 +277,6 @@ export class TaskTrigger extends jspb.Message { export namespace TaskTrigger { export type AsObject = { - triggerType: TriggerType, manual: boolean, at?: FixedEpochCondition.AsObject, cron?: CronCondition.AsObject, @@ -287,8 +284,8 @@ export namespace TaskTrigger { event?: EventCondition.AsObject, } - export enum TriggerConditionCase { - TRIGGER_CONDITION_NOT_SET = 0, + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, MANUAL = 2, AT = 3, CRON = 4, @@ -376,25 +373,25 @@ export namespace ContractWriteNode { } } -export class ContractQueryNode extends jspb.Message { +export class ContractReadNode extends jspb.Message { getContractAddress(): string; - setContractAddress(value: string): ContractQueryNode; + setContractAddress(value: string): ContractReadNode; getCallData(): string; - setCallData(value: string): ContractQueryNode; + setCallData(value: string): ContractReadNode; getContractAbi(): string; - setContractAbi(value: string): ContractQueryNode; + setContractAbi(value: string): ContractReadNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryNode.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryNode): ContractQueryNode.AsObject; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryNode; - static deserializeBinaryFromReader(message: ContractQueryNode, reader: jspb.BinaryReader): ContractQueryNode; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; } -export namespace ContractQueryNode { +export namespace ContractReadNode { export type AsObject = { contractAddress: string, callData: string, @@ -479,44 +476,37 @@ export namespace CustomCodeNode { } } -export class ConditionJump extends jspb.Message { +export class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; + setExpression(value: string): Condition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; } -export namespace ConditionJump { +export namespace Condition { export type AsObject = { + id: string, + type: string, expression: string, - next: string, } } export class BranchNode extends jspb.Message { - - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchNode; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchNode; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; - - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchNode; + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): BranchNode.AsObject; @@ -530,9 +520,7 @@ export class BranchNode extends jspb.Message { export namespace BranchNode { export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, + conditionsList: Array, } } @@ -583,8 +571,6 @@ export namespace TaskEdge { } export class TaskNode extends jspb.Message { - getNodeType(): TaskType; - setNodeType(value: TaskType): TaskNode; getId(): string; setId(value: string): TaskNode; getName(): string; @@ -602,8 +588,8 @@ export class TaskNode extends jspb.Message { hasContractRead(): boolean; clearContractRead(): void; - getContractRead(): ContractQueryNode | undefined; - setContractRead(value?: ContractQueryNode): TaskNode; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; @@ -630,7 +616,7 @@ export class TaskNode extends jspb.Message { getCustomCode(): CustomCodeNode | undefined; setCustomCode(value?: CustomCodeNode): TaskNode; - getTaskBodyCase(): TaskNode.TaskBodyCase; + getTaskTypeCase(): TaskNode.TaskTypeCase; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): TaskNode.AsObject; @@ -644,12 +630,11 @@ export class TaskNode extends jspb.Message { export namespace TaskNode { export type AsObject = { - nodeType: TaskType, id: string, name: string, ethTransfer?: ETHTransferNode.AsObject, contractWrite?: ContractWriteNode.AsObject, - contractRead?: ContractQueryNode.AsObject, + contractRead?: ContractReadNode.AsObject, graphqlDataQuery?: GraphQLQueryNode.AsObject, restApi?: RestAPINode.AsObject, branch?: BranchNode.AsObject, @@ -657,8 +642,8 @@ export namespace TaskNode { customCode?: CustomCodeNode.AsObject, } - export enum TaskBodyCase { - TASK_BODY_NOT_SET = 0, + export enum TaskTypeCase { + TASK_TYPE_NOT_SET = 0, ETH_TRANSFER = 10, CONTRACT_WRITE = 11, CONTRACT_READ = 12, @@ -698,11 +683,8 @@ export namespace Execution { } export class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; + getId(): string; + setId(value: string): Task; getOwner(): string; setOwner(value: string): Task; getSmartWalletAddress(): string; @@ -749,7 +731,7 @@ export class Task extends jspb.Message { export namespace Task { export type AsObject = { - id?: UUID.AsObject, + id: string, owner: string, smartWalletAddress: string, startAt: number, @@ -873,23 +855,23 @@ export namespace NonceResp { } } -export class AddressRequest extends jspb.Message { +export class ListWalletReq extends jspb.Message { getFactory(): string; - setFactory(value: string): AddressRequest; + setFactory(value: string): ListWalletReq; getSalt(): string; - setSalt(value: string): AddressRequest; + setSalt(value: string): ListWalletReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; } -export namespace AddressRequest { +export namespace ListWalletReq { export type AsObject = { factory: string, salt: string, @@ -922,23 +904,23 @@ export namespace SmartWallet { } } -export class AddressResp extends jspb.Message { +export class ListWalletResp extends jspb.Message { clearWalletsList(): void; getWalletsList(): Array; - setWalletsList(value: Array): AddressResp; + setWalletsList(value: Array): ListWalletResp; addWallets(value?: SmartWallet, index?: number): SmartWallet; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; } -export namespace AddressResp { +export namespace ListWalletResp { export type AsObject = { walletsList: Array, } @@ -1109,6 +1091,10 @@ export namespace CreateWalletReq { export class CreateWalletResp extends jspb.Message { getAddress(): string; setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateWalletResp.AsObject; @@ -1123,6 +1109,8 @@ export class CreateWalletResp extends jspb.Message { export namespace CreateWalletResp { export type AsObject = { address: string, + salt: string, + factoryAddress: string, } } @@ -1156,14 +1144,3 @@ export enum TaskStatus { export enum CustomCodeType { JAVASCRIPT = 0, } - -export enum TaskType { - ETHTRANSFERTASK = 0, - CONTRACTWRITETASK = 1, - CONTRACTREADTASK = 2, - GRAPHQLDATAQUERYTASK = 3, - RESTAPITASK = 4, - BRANCHTASK = 5, - FILTERTASK = 6, - CUSTOMCODETASK = 7, -} diff --git a/grpc_codegen/avs_pb.js b/grpc_codegen/avs_pb.js index d465414..f951868 100644 --- a/grpc_codegen/avs_pb.js +++ b/grpc_codegen/avs_pb.js @@ -25,15 +25,13 @@ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/time goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); -goog.exportSymbol('proto.aggregator.AddressRequest', null, global); -goog.exportSymbol('proto.aggregator.AddressResp', null, global); goog.exportSymbol('proto.aggregator.BlockCondition', null, global); goog.exportSymbol('proto.aggregator.BranchNode', null, global); goog.exportSymbol('proto.aggregator.Checkin', null, global); goog.exportSymbol('proto.aggregator.Checkin.Status', null, global); goog.exportSymbol('proto.aggregator.CheckinResp', null, global); -goog.exportSymbol('proto.aggregator.ConditionJump', null, global); -goog.exportSymbol('proto.aggregator.ContractQueryNode', null, global); +goog.exportSymbol('proto.aggregator.Condition', null, global); +goog.exportSymbol('proto.aggregator.ContractReadNode', null, global); goog.exportSymbol('proto.aggregator.ContractWriteNode', null, global); goog.exportSymbol('proto.aggregator.CreateTaskReq', null, global); goog.exportSymbol('proto.aggregator.CreateTaskResp', null, global); @@ -50,9 +48,12 @@ goog.exportSymbol('proto.aggregator.FilterNode', null, global); goog.exportSymbol('proto.aggregator.FixedEpochCondition', null, global); goog.exportSymbol('proto.aggregator.GetKeyReq', null, global); goog.exportSymbol('proto.aggregator.GraphQLQueryNode', null, global); +goog.exportSymbol('proto.aggregator.IdReq', null, global); goog.exportSymbol('proto.aggregator.KeyResp', null, global); goog.exportSymbol('proto.aggregator.ListTasksReq', null, global); goog.exportSymbol('proto.aggregator.ListTasksResp', null, global); +goog.exportSymbol('proto.aggregator.ListWalletReq', null, global); +goog.exportSymbol('proto.aggregator.ListWalletResp', null, global); goog.exportSymbol('proto.aggregator.NonceRequest', null, global); goog.exportSymbol('proto.aggregator.NonceResp', null, global); goog.exportSymbol('proto.aggregator.RestAPINode', null, global); @@ -62,13 +63,11 @@ goog.exportSymbol('proto.aggregator.SyncTasksResp', null, global); goog.exportSymbol('proto.aggregator.Task', null, global); goog.exportSymbol('proto.aggregator.TaskEdge', null, global); goog.exportSymbol('proto.aggregator.TaskNode', null, global); -goog.exportSymbol('proto.aggregator.TaskNode.TaskBodyCase', null, global); +goog.exportSymbol('proto.aggregator.TaskNode.TaskTypeCase', null, global); goog.exportSymbol('proto.aggregator.TaskStatus', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger', null, global); -goog.exportSymbol('proto.aggregator.TaskTrigger.TriggerConditionCase', null, global); -goog.exportSymbol('proto.aggregator.TaskType', null, global); +goog.exportSymbol('proto.aggregator.TaskTrigger.TriggerTypeCase', null, global); goog.exportSymbol('proto.aggregator.TriggerType', null, global); -goog.exportSymbol('proto.aggregator.UUID', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); /** @@ -81,16 +80,16 @@ goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); * @extends {jspb.Message} * @constructor */ -proto.aggregator.UUID = function(opt_data) { +proto.aggregator.IdReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.UUID, jspb.Message); +goog.inherits(proto.aggregator.IdReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.UUID.displayName = 'proto.aggregator.UUID'; + proto.aggregator.IdReq.displayName = 'proto.aggregator.IdReq'; } /** * Generated by JsPbCodeGenerator. @@ -354,16 +353,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractQueryNode = function(opt_data) { +proto.aggregator.ContractReadNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); +goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractQueryNode.displayName = 'proto.aggregator.ContractQueryNode'; + proto.aggregator.ContractReadNode.displayName = 'proto.aggregator.ContractReadNode'; } /** * Generated by JsPbCodeGenerator. @@ -438,16 +437,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ConditionJump = function(opt_data) { +proto.aggregator.Condition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ConditionJump, jspb.Message); +goog.inherits(proto.aggregator.Condition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ConditionJump.displayName = 'proto.aggregator.ConditionJump'; + proto.aggregator.Condition.displayName = 'proto.aggregator.Condition'; } /** * Generated by JsPbCodeGenerator. @@ -669,16 +668,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.AddressRequest = function(opt_data) { +proto.aggregator.ListWalletReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.AddressRequest, jspb.Message); +goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.AddressRequest.displayName = 'proto.aggregator.AddressRequest'; + proto.aggregator.ListWalletReq.displayName = 'proto.aggregator.ListWalletReq'; } /** * Generated by JsPbCodeGenerator. @@ -711,16 +710,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.AddressResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); +proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); }; -goog.inherits(proto.aggregator.AddressResp, jspb.Message); +goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.AddressResp.displayName = 'proto.aggregator.AddressResp'; + proto.aggregator.ListWalletResp.displayName = 'proto.aggregator.ListWalletResp'; } /** * Generated by JsPbCodeGenerator. @@ -906,8 +905,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); +proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.toObject(opt_includeInstance, this); }; @@ -916,13 +915,13 @@ proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.UUID} msg The msg instance to transform. + * @param {!proto.aggregator.IdReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UUID.toObject = function(includeInstance, msg) { +proto.aggregator.IdReq.toObject = function(includeInstance, msg) { var f, obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -936,23 +935,23 @@ proto.aggregator.UUID.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UUID} + * @return {!proto.aggregator.IdReq} */ -proto.aggregator.UUID.deserializeBinary = function(bytes) { +proto.aggregator.IdReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID; - return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.IdReq; + return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.UUID} msg The message object to deserialize into. + * @param {!proto.aggregator.IdReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UUID} + * @return {!proto.aggregator.IdReq} */ -proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -961,7 +960,7 @@ proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setBytes(value); + msg.setId(value); break; default: reader.skipField(); @@ -976,9 +975,9 @@ proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UUID.prototype.serializeBinary = function() { +proto.aggregator.IdReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UUID.serializeBinaryToWriter(this, writer); + proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -986,13 +985,13 @@ proto.aggregator.UUID.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UUID} message + * @param {!proto.aggregator.IdReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBytes(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -1003,19 +1002,19 @@ proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { /** - * optional string bytes = 1; + * optional string id = 1; * @return {string} */ -proto.aggregator.UUID.prototype.getBytes = function() { +proto.aggregator.IdReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.UUID} returns this + * @return {!proto.aggregator.IdReq} returns this */ -proto.aggregator.UUID.prototype.setBytes = function(value) { +proto.aggregator.IdReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -2521,8 +2520,8 @@ proto.aggregator.TaskTrigger.oneofGroups_ = [[2,3,4,5,6]]; /** * @enum {number} */ -proto.aggregator.TaskTrigger.TriggerConditionCase = { - TRIGGER_CONDITION_NOT_SET: 0, +proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, MANUAL: 2, AT: 3, CRON: 4, @@ -2531,10 +2530,10 @@ proto.aggregator.TaskTrigger.TriggerConditionCase = { }; /** - * @return {proto.aggregator.TaskTrigger.TriggerConditionCase} + * @return {proto.aggregator.TaskTrigger.TriggerTypeCase} */ -proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { - return /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0])); +proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { + return /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0])); }; @@ -2568,7 +2567,6 @@ proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) */ proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), @@ -2610,10 +2608,6 @@ proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.TriggerType} */ (reader.readEnum()); - msg.setTriggerType(value); - break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setManual(value); @@ -2667,13 +2661,6 @@ proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { */ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTriggerType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeBool( @@ -2716,24 +2703,6 @@ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) }; -/** - * optional TriggerType trigger_type = 1; - * @return {!proto.aggregator.TriggerType} - */ -proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return /** @type {!proto.aggregator.TriggerType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.aggregator.TriggerType} value - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - /** * optional bool manual = 2; * @return {boolean} @@ -3495,8 +3464,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); +proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; @@ -3505,11 +3474,11 @@ proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ContractQueryNode} msg The msg instance to transform. + * @param {!proto.aggregator.ContractReadNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { +proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), callData: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -3527,23 +3496,23 @@ proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractQueryNode} + * @return {!proto.aggregator.ContractReadNode} */ -proto.aggregator.ContractQueryNode.deserializeBinary = function(bytes) { +proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryNode; - return proto.aggregator.ContractQueryNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractReadNode; + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ContractQueryNode} msg The message object to deserialize into. + * @param {!proto.aggregator.ContractReadNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ContractQueryNode} + * @return {!proto.aggregator.ContractReadNode} */ -proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3575,9 +3544,9 @@ proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { +proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3585,11 +3554,11 @@ proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractQueryNode} message + * @param {!proto.aggregator.ContractReadNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getContractAddress(); if (f.length > 0) { @@ -3619,16 +3588,16 @@ proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, w * optional string contract_address = 1; * @return {string} */ -proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { +proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractQueryNode} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { +proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -3637,16 +3606,16 @@ proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value * optional string call_data = 2; * @return {string} */ -proto.aggregator.ContractQueryNode.prototype.getCallData = function() { +proto.aggregator.ContractReadNode.prototype.getCallData = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractQueryNode} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { +proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3655,16 +3624,16 @@ proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { * optional string contract_abi = 3; * @return {string} */ -proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { +proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractQueryNode} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { +proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; @@ -4228,8 +4197,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); +proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); }; @@ -4238,14 +4207,15 @@ proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ConditionJump} msg The msg instance to transform. + * @param {!proto.aggregator.Condition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { +proto.aggregator.Condition.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -4259,23 +4229,23 @@ proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.Condition} */ -proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { +proto.aggregator.Condition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump; - return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.Condition; + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ConditionJump} msg The message object to deserialize into. + * @param {!proto.aggregator.Condition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.Condition} */ -proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4284,11 +4254,15 @@ proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setNext(value); + msg.setType(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); break; default: reader.skipField(); @@ -4303,9 +4277,9 @@ proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ConditionJump.prototype.serializeBinary = function() { +proto.aggregator.Condition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4313,72 +4287,97 @@ proto.aggregator.ConditionJump.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ConditionJump} message + * @param {!proto.aggregator.Condition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getExpression(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getNext(); + f = message.getType(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional string expression = 1; + * optional string id = 1; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getExpression = function() { +proto.aggregator.Condition.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.ConditionJump.prototype.setExpression = function(value) { +proto.aggregator.Condition.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string next = 2; + * optional string type = 2; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getNext = function() { +proto.aggregator.Condition.prototype.getType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.ConditionJump.prototype.setNext = function(value) { +proto.aggregator.Condition.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional string expression = 3; + * @return {string} + */ +proto.aggregator.Condition.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Condition} returns this + */ +proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.aggregator.BranchNode.repeatedFields_ = [2]; +proto.aggregator.BranchNode.repeatedFields_ = [1]; @@ -4411,10 +4410,8 @@ proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { */ proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList(msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, includeInstance), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + conditionsList: jspb.Message.toObjectList(msg.getConditionsList(), + proto.aggregator.Condition.toObject, includeInstance) }; if (includeInstance) { @@ -4452,19 +4449,9 @@ proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); + var value = new proto.aggregator.Condition; + reader.readMessage(value,proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); break; default: reader.skipField(); @@ -4495,96 +4482,43 @@ proto.aggregator.BranchNode.prototype.serializeBinary = function() { */ proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIf(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElseifsList(); + f = message.getConditionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, + 1, f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + proto.aggregator.Condition.serializeBinaryToWriter ); } }; /** - * optional ConditionJump if = 1; - * @return {?proto.aggregator.ConditionJump} - */ -proto.aggregator.BranchNode.prototype.getIf = function() { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1)); -}; - - -/** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchNode} returns this -*/ -proto.aggregator.BranchNode.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchNode} returns this - */ -proto.aggregator.BranchNode.prototype.clearIf = function() { - return this.setIf(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} + * repeated Condition conditions = 1; + * @return {!Array} */ -proto.aggregator.BranchNode.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1)); }; /** - * repeated ConditionJump elseIfs = 2; - * @return {!Array} - */ -proto.aggregator.BranchNode.prototype.getElseifsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2)); -}; - - -/** - * @param {!Array} value + * @param {!Array} value * @return {!proto.aggregator.BranchNode} returns this */ -proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.aggregator.ConditionJump=} opt_value + * @param {!proto.aggregator.Condition=} opt_value * @param {number=} opt_index - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.Condition} */ -proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); +proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); }; @@ -4592,45 +4526,8 @@ proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index * Clears the list making it empty but non-null. * @return {!proto.aggregator.BranchNode} returns this */ -proto.aggregator.BranchNode.prototype.clearElseifsList = function() { - return this.setElseifsList([]); -}; - - -/** - * optional ConditionJump else = 3; - * @return {?proto.aggregator.ConditionJump} - */ -proto.aggregator.BranchNode.prototype.getElse = function() { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3)); -}; - - -/** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchNode} returns this -*/ -proto.aggregator.BranchNode.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchNode} returns this - */ -proto.aggregator.BranchNode.prototype.clearElse = function() { - return this.setElse(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.BranchNode.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); }; @@ -4968,8 +4865,8 @@ proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17]]; /** * @enum {number} */ -proto.aggregator.TaskNode.TaskBodyCase = { - TASK_BODY_NOT_SET: 0, +proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, ETH_TRANSFER: 10, CONTRACT_WRITE: 11, CONTRACT_READ: 12, @@ -4981,10 +4878,10 @@ proto.aggregator.TaskNode.TaskBodyCase = { }; /** - * @return {proto.aggregator.TaskNode.TaskBodyCase} + * @return {proto.aggregator.TaskNode.TaskTypeCase} */ -proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { - return /** @type {proto.aggregator.TaskNode.TaskBodyCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); +proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { + return /** @type {proto.aggregator.TaskNode.TaskTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); }; @@ -5018,12 +4915,11 @@ proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { */ proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { var f, obj = { - nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 3, ""), ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), - contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractQueryNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), @@ -5065,10 +4961,6 @@ proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.TaskType} */ (reader.readEnum()); - msg.setNodeType(value); - break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setId(value); @@ -5088,8 +4980,8 @@ proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.ContractQueryNode; - reader.readMessage(value,proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + var value = new proto.aggregator.ContractReadNode; + reader.readMessage(value,proto.aggregator.ContractReadNode.deserializeBinaryFromReader); msg.setContractRead(value); break; case 13: @@ -5146,13 +5038,6 @@ proto.aggregator.TaskNode.prototype.serializeBinary = function() { */ proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } f = message.getId(); if (f.length > 0) { writer.writeString( @@ -5188,7 +5073,7 @@ proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { writer.writeMessage( 12, f, - proto.aggregator.ContractQueryNode.serializeBinaryToWriter + proto.aggregator.ContractReadNode.serializeBinaryToWriter ); } f = message.getGraphqlDataQuery(); @@ -5234,24 +5119,6 @@ proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { }; -/** - * optional TaskType node_type = 1; - * @return {!proto.aggregator.TaskType} - */ -proto.aggregator.TaskNode.prototype.getNodeType = function() { - return /** @type {!proto.aggregator.TaskType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.aggregator.TaskType} value - * @return {!proto.aggregator.TaskNode} returns this - */ -proto.aggregator.TaskNode.prototype.setNodeType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - /** * optional string id = 2; * @return {string} @@ -5363,17 +5230,17 @@ proto.aggregator.TaskNode.prototype.hasContractWrite = function() { /** - * optional ContractQueryNode contract_read = 12; - * @return {?proto.aggregator.ContractQueryNode} + * optional ContractReadNode contract_read = 12; + * @return {?proto.aggregator.ContractReadNode} */ proto.aggregator.TaskNode.prototype.getContractRead = function() { - return /** @type{?proto.aggregator.ContractQueryNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12)); + return /** @type{?proto.aggregator.ContractReadNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12)); }; /** - * @param {?proto.aggregator.ContractQueryNode|undefined} value + * @param {?proto.aggregator.ContractReadNode|undefined} value * @return {!proto.aggregator.TaskNode} returns this */ proto.aggregator.TaskNode.prototype.setContractRead = function(value) { @@ -5813,7 +5680,7 @@ proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { */ proto.aggregator.Task.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), + id: jspb.Message.getFieldWithDefault(msg, 1, ""), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), @@ -5866,8 +5733,7 @@ proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.UUID; - reader.readMessage(value,proto.aggregator.UUID.deserializeBinaryFromReader); + var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: @@ -5952,11 +5818,10 @@ proto.aggregator.Task.prototype.serializeBinary = function() { proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); - if (f != null) { - writer.writeMessage( + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.UUID.serializeBinaryToWriter + f ); } f = message.getOwner(); @@ -6051,39 +5916,20 @@ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { /** - * optional UUID id = 1; - * @return {?proto.aggregator.UUID} + * optional string id = 1; + * @return {string} */ proto.aggregator.Task.prototype.getId = function() { - return /** @type{?proto.aggregator.UUID} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1)); -}; - - -/** - * @param {?proto.aggregator.UUID|undefined} value - * @return {!proto.aggregator.Task} returns this -*/ -proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Clears the message field making it undefined. + * @param {string} value * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Task.prototype.clearId = function() { - return this.setId(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.Task.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -7202,8 +7048,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); +proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); }; @@ -7212,11 +7058,11 @@ proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.AddressRequest} msg The msg instance to transform. + * @param {!proto.aggregator.ListWalletReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { +proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { var f, obj = { factory: jspb.Message.getFieldWithDefault(msg, 1, ""), salt: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -7233,23 +7079,23 @@ proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.AddressRequest} + * @return {!proto.aggregator.ListWalletReq} */ -proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { +proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest; - return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletReq; + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.AddressRequest} msg The message object to deserialize into. + * @param {!proto.aggregator.ListWalletReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.AddressRequest} + * @return {!proto.aggregator.ListWalletReq} */ -proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7277,9 +7123,9 @@ proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressRequest.prototype.serializeBinary = function() { +proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7287,11 +7133,11 @@ proto.aggregator.AddressRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.AddressRequest} message + * @param {!proto.aggregator.ListWalletReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFactory(); if (f.length > 0) { @@ -7314,16 +7160,16 @@ proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writ * optional string factory = 1; * @return {string} */ -proto.aggregator.AddressRequest.prototype.getFactory = function() { +proto.aggregator.ListWalletReq.prototype.getFactory = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.AddressRequest} returns this + * @return {!proto.aggregator.ListWalletReq} returns this */ -proto.aggregator.AddressRequest.prototype.setFactory = function(value) { +proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -7332,16 +7178,16 @@ proto.aggregator.AddressRequest.prototype.setFactory = function(value) { * optional string salt = 2; * @return {string} */ -proto.aggregator.AddressRequest.prototype.getSalt = function() { +proto.aggregator.ListWalletReq.prototype.getSalt = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.AddressRequest} returns this + * @return {!proto.aggregator.ListWalletReq} returns this */ -proto.aggregator.AddressRequest.prototype.setSalt = function(value) { +proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -7542,7 +7388,7 @@ proto.aggregator.SmartWallet.prototype.setFactory = function(value) { * @private {!Array} * @const */ -proto.aggregator.AddressResp.repeatedFields_ = [1]; +proto.aggregator.ListWalletResp.repeatedFields_ = [1]; @@ -7559,8 +7405,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); +proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); }; @@ -7569,11 +7415,11 @@ proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.AddressResp} msg The msg instance to transform. + * @param {!proto.aggregator.ListWalletResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { +proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { var f, obj = { walletsList: jspb.Message.toObjectList(msg.getWalletsList(), proto.aggregator.SmartWallet.toObject, includeInstance) @@ -7590,23 +7436,23 @@ proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.AddressResp} + * @return {!proto.aggregator.ListWalletResp} */ -proto.aggregator.AddressResp.deserializeBinary = function(bytes) { +proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp; - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletResp; + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.AddressResp} msg The message object to deserialize into. + * @param {!proto.aggregator.ListWalletResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.AddressResp} + * @return {!proto.aggregator.ListWalletResp} */ -proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7631,9 +7477,9 @@ proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressResp.prototype.serializeBinary = function() { +proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7641,11 +7487,11 @@ proto.aggregator.AddressResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.AddressResp} message + * @param {!proto.aggregator.ListWalletResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getWalletsList(); if (f.length > 0) { @@ -7662,7 +7508,7 @@ proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) * repeated SmartWallet wallets = 1; * @return {!Array} */ -proto.aggregator.AddressResp.prototype.getWalletsList = function() { +proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1)); }; @@ -7670,9 +7516,9 @@ proto.aggregator.AddressResp.prototype.getWalletsList = function() { /** * @param {!Array} value - * @return {!proto.aggregator.AddressResp} returns this + * @return {!proto.aggregator.ListWalletResp} returns this */ -proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { +proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; @@ -7682,16 +7528,16 @@ proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { * @param {number=} opt_index * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { +proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); }; /** * Clears the list making it empty but non-null. - * @return {!proto.aggregator.AddressResp} returns this + * @return {!proto.aggregator.ListWalletResp} returns this */ -proto.aggregator.AddressResp.prototype.clearWalletsList = function() { +proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { return this.setWalletsList([]); }; @@ -8865,7 +8711,9 @@ proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInsta */ proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -8906,6 +8754,14 @@ proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, re var value = /** @type {string} */ (reader.readString()); msg.setAddress(value); break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFactoryAddress(value); + break; default: reader.skipField(); break; @@ -8942,6 +8798,20 @@ proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, wr f ); } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; @@ -8963,6 +8833,42 @@ proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { }; +/** + * optional string salt = 2; + * @return {string} + */ +proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this + */ +proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string factory_address = 3; + * @return {string} + */ +proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this + */ +proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + /** * @enum {number} */ @@ -9006,18 +8912,4 @@ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; -/** - * @enum {number} - */ -proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTWRITETASK: 1, - CONTRACTREADTASK: 2, - GRAPHQLDATAQUERYTASK: 3, - RESTAPITASK: 4, - BRANCHTASK: 5, - FILTERTASK: 6, - CUSTOMCODETASK: 7 -}; - goog.object.extend(exports, proto.aggregator); diff --git a/grpc_codegen/compiled.d.ts b/grpc_codegen/compiled.d.ts new file mode 100644 index 0000000..1f915ba --- /dev/null +++ b/grpc_codegen/compiled.d.ts @@ -0,0 +1,5536 @@ +import * as $protobuf from "protobufjs"; +import Long = require("long"); +/** Namespace aggregator. */ +export namespace aggregator { + + /** Properties of a UUID. */ + interface IUUID { + + /** UUID bytes */ + bytes?: (string|null); + } + + /** Represents a UUID. */ + class UUID implements IUUID { + + /** + * Constructs a new UUID. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IUUID); + + /** UUID bytes. */ + public bytes: string; + + /** + * Creates a new UUID instance using the specified properties. + * @param [properties] Properties to set + * @returns UUID instance + */ + public static create(properties?: aggregator.IUUID): aggregator.UUID; + + /** + * Encodes the specified UUID message. Does not implicitly {@link aggregator.UUID.verify|verify} messages. + * @param message UUID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IUUID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UUID message, length delimited. Does not implicitly {@link aggregator.UUID.verify|verify} messages. + * @param message UUID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IUUID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UUID message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UUID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.UUID; + + /** + * Decodes a UUID message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UUID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.UUID; + + /** + * Verifies a UUID message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UUID message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UUID + */ + public static fromObject(object: { [k: string]: any }): aggregator.UUID; + + /** + * Creates a plain object from a UUID message. Also converts values to other types if specified. + * @param message UUID + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.UUID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UUID to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UUID + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Checkin. */ + interface ICheckin { + + /** Checkin id */ + id?: (string|null); + + /** Checkin address */ + address?: (string|null); + + /** Checkin signature */ + signature?: (string|null); + + /** Checkin status */ + status?: (aggregator.Checkin.IStatus|null); + + /** Checkin version */ + version?: (string|null); + + /** Checkin metricsPort */ + metricsPort?: (number|null); + + /** Checkin remoteIP */ + remoteIP?: (string|null); + } + + /** Represents a Checkin. */ + class Checkin implements ICheckin { + + /** + * Constructs a new Checkin. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICheckin); + + /** Checkin id. */ + public id: string; + + /** Checkin address. */ + public address: string; + + /** Checkin signature. */ + public signature: string; + + /** Checkin status. */ + public status?: (aggregator.Checkin.IStatus|null); + + /** Checkin version. */ + public version: string; + + /** Checkin metricsPort. */ + public metricsPort: number; + + /** Checkin remoteIP. */ + public remoteIP: string; + + /** + * Creates a new Checkin instance using the specified properties. + * @param [properties] Properties to set + * @returns Checkin instance + */ + public static create(properties?: aggregator.ICheckin): aggregator.Checkin; + + /** + * Encodes the specified Checkin message. Does not implicitly {@link aggregator.Checkin.verify|verify} messages. + * @param message Checkin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICheckin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Checkin message, length delimited. Does not implicitly {@link aggregator.Checkin.verify|verify} messages. + * @param message Checkin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICheckin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Checkin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Checkin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Checkin; + + /** + * Decodes a Checkin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Checkin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Checkin; + + /** + * Verifies a Checkin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Checkin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Checkin + */ + public static fromObject(object: { [k: string]: any }): aggregator.Checkin; + + /** + * Creates a plain object from a Checkin message. Also converts values to other types if specified. + * @param message Checkin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.Checkin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Checkin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Checkin + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Checkin { + + /** Properties of a Status. */ + interface IStatus { + + /** Status uptime */ + uptime?: (number|Long|null); + + /** Status queueDepth */ + queueDepth?: (number|Long|null); + + /** Status lastHeartbeat */ + lastHeartbeat?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.Checkin.IStatus); + + /** Status uptime. */ + public uptime: (number|Long); + + /** Status queueDepth. */ + public queueDepth: (number|Long); + + /** Status lastHeartbeat. */ + public lastHeartbeat?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: aggregator.Checkin.IStatus): aggregator.Checkin.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link aggregator.Checkin.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.Checkin.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link aggregator.Checkin.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.Checkin.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Checkin.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Checkin.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): aggregator.Checkin.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.Checkin.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CheckinResp. */ + interface ICheckinResp { + + /** CheckinResp updatedAt */ + updatedAt?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CheckinResp. */ + class CheckinResp implements ICheckinResp { + + /** + * Constructs a new CheckinResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICheckinResp); + + /** CheckinResp updatedAt. */ + public updatedAt?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CheckinResp instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckinResp instance + */ + public static create(properties?: aggregator.ICheckinResp): aggregator.CheckinResp; + + /** + * Encodes the specified CheckinResp message. Does not implicitly {@link aggregator.CheckinResp.verify|verify} messages. + * @param message CheckinResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICheckinResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckinResp message, length delimited. Does not implicitly {@link aggregator.CheckinResp.verify|verify} messages. + * @param message CheckinResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICheckinResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckinResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckinResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CheckinResp; + + /** + * Decodes a CheckinResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckinResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CheckinResp; + + /** + * Verifies a CheckinResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckinResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckinResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.CheckinResp; + + /** + * Creates a plain object from a CheckinResp message. Also converts values to other types if specified. + * @param message CheckinResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CheckinResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckinResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckinResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SyncTasksReq. */ + interface ISyncTasksReq { + + /** SyncTasksReq id */ + id?: (string|null); + + /** SyncTasksReq address */ + address?: (string|null); + + /** SyncTasksReq signature */ + signature?: (string|null); + + /** SyncTasksReq monotonicClock */ + monotonicClock?: (number|Long|null); + } + + /** Represents a SyncTasksReq. */ + class SyncTasksReq implements ISyncTasksReq { + + /** + * Constructs a new SyncTasksReq. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ISyncTasksReq); + + /** SyncTasksReq id. */ + public id: string; + + /** SyncTasksReq address. */ + public address: string; + + /** SyncTasksReq signature. */ + public signature: string; + + /** SyncTasksReq monotonicClock. */ + public monotonicClock: (number|Long); + + /** + * Creates a new SyncTasksReq instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncTasksReq instance + */ + public static create(properties?: aggregator.ISyncTasksReq): aggregator.SyncTasksReq; + + /** + * Encodes the specified SyncTasksReq message. Does not implicitly {@link aggregator.SyncTasksReq.verify|verify} messages. + * @param message SyncTasksReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ISyncTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncTasksReq message, length delimited. Does not implicitly {@link aggregator.SyncTasksReq.verify|verify} messages. + * @param message SyncTasksReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ISyncTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncTasksReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncTasksReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.SyncTasksReq; + + /** + * Decodes a SyncTasksReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncTasksReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.SyncTasksReq; + + /** + * Verifies a SyncTasksReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SyncTasksReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncTasksReq + */ + public static fromObject(object: { [k: string]: any }): aggregator.SyncTasksReq; + + /** + * Creates a plain object from a SyncTasksReq message. Also converts values to other types if specified. + * @param message SyncTasksReq + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.SyncTasksReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncTasksReq to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncTasksReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** TriggerType enum. */ + enum TriggerType { + ManualTrigger = 0, + FixedEpochTrigger = 1, + CronTrigger = 2, + BlockTrigger = 3, + EventTrigger = 4 + } + + /** Properties of a FixedEpochCondition. */ + interface IFixedEpochCondition { + + /** FixedEpochCondition epoches */ + epoches?: ((number|Long)[]|null); + } + + /** Represents a FixedEpochCondition. */ + class FixedEpochCondition implements IFixedEpochCondition { + + /** + * Constructs a new FixedEpochCondition. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IFixedEpochCondition); + + /** FixedEpochCondition epoches. */ + public epoches: (number|Long)[]; + + /** + * Creates a new FixedEpochCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns FixedEpochCondition instance + */ + public static create(properties?: aggregator.IFixedEpochCondition): aggregator.FixedEpochCondition; + + /** + * Encodes the specified FixedEpochCondition message. Does not implicitly {@link aggregator.FixedEpochCondition.verify|verify} messages. + * @param message FixedEpochCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IFixedEpochCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FixedEpochCondition message, length delimited. Does not implicitly {@link aggregator.FixedEpochCondition.verify|verify} messages. + * @param message FixedEpochCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IFixedEpochCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FixedEpochCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FixedEpochCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.FixedEpochCondition; + + /** + * Decodes a FixedEpochCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FixedEpochCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.FixedEpochCondition; + + /** + * Verifies a FixedEpochCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FixedEpochCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FixedEpochCondition + */ + public static fromObject(object: { [k: string]: any }): aggregator.FixedEpochCondition; + + /** + * Creates a plain object from a FixedEpochCondition message. Also converts values to other types if specified. + * @param message FixedEpochCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.FixedEpochCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FixedEpochCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FixedEpochCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CronCondition. */ + interface ICronCondition { + + /** CronCondition cronTable */ + cronTable?: (string[]|null); + } + + /** Represents a CronCondition. */ + class CronCondition implements ICronCondition { + + /** + * Constructs a new CronCondition. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICronCondition); + + /** CronCondition cronTable. */ + public cronTable: string[]; + + /** + * Creates a new CronCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns CronCondition instance + */ + public static create(properties?: aggregator.ICronCondition): aggregator.CronCondition; + + /** + * Encodes the specified CronCondition message. Does not implicitly {@link aggregator.CronCondition.verify|verify} messages. + * @param message CronCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICronCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CronCondition message, length delimited. Does not implicitly {@link aggregator.CronCondition.verify|verify} messages. + * @param message CronCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICronCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CronCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CronCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CronCondition; + + /** + * Decodes a CronCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CronCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CronCondition; + + /** + * Verifies a CronCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CronCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CronCondition + */ + public static fromObject(object: { [k: string]: any }): aggregator.CronCondition; + + /** + * Creates a plain object from a CronCondition message. Also converts values to other types if specified. + * @param message CronCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CronCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CronCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CronCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BlockCondition. */ + interface IBlockCondition { + + /** BlockCondition interval */ + interval?: (number|Long|null); + } + + /** Represents a BlockCondition. */ + class BlockCondition implements IBlockCondition { + + /** + * Constructs a new BlockCondition. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IBlockCondition); + + /** BlockCondition interval. */ + public interval: (number|Long); + + /** + * Creates a new BlockCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns BlockCondition instance + */ + public static create(properties?: aggregator.IBlockCondition): aggregator.BlockCondition; + + /** + * Encodes the specified BlockCondition message. Does not implicitly {@link aggregator.BlockCondition.verify|verify} messages. + * @param message BlockCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IBlockCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlockCondition message, length delimited. Does not implicitly {@link aggregator.BlockCondition.verify|verify} messages. + * @param message BlockCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IBlockCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BlockCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.BlockCondition; + + /** + * Decodes a BlockCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BlockCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.BlockCondition; + + /** + * Verifies a BlockCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlockCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlockCondition + */ + public static fromObject(object: { [k: string]: any }): aggregator.BlockCondition; + + /** + * Creates a plain object from a BlockCondition message. Also converts values to other types if specified. + * @param message BlockCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.BlockCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlockCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BlockCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EventCondition. */ + interface IEventCondition { + + /** EventCondition expression */ + expression?: (string|null); + } + + /** Represents an EventCondition. */ + class EventCondition implements IEventCondition { + + /** + * Constructs a new EventCondition. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IEventCondition); + + /** EventCondition expression. */ + public expression: string; + + /** + * Creates a new EventCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns EventCondition instance + */ + public static create(properties?: aggregator.IEventCondition): aggregator.EventCondition; + + /** + * Encodes the specified EventCondition message. Does not implicitly {@link aggregator.EventCondition.verify|verify} messages. + * @param message EventCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IEventCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EventCondition message, length delimited. Does not implicitly {@link aggregator.EventCondition.verify|verify} messages. + * @param message EventCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IEventCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EventCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EventCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.EventCondition; + + /** + * Decodes an EventCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EventCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.EventCondition; + + /** + * Verifies an EventCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EventCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EventCondition + */ + public static fromObject(object: { [k: string]: any }): aggregator.EventCondition; + + /** + * Creates a plain object from an EventCondition message. Also converts values to other types if specified. + * @param message EventCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.EventCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EventCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EventCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TaskTrigger. */ + interface ITaskTrigger { + + /** TaskTrigger triggerType */ + triggerType?: (aggregator.TriggerType|null); + + /** TaskTrigger manual */ + manual?: (boolean|null); + + /** TaskTrigger at */ + at?: (aggregator.IFixedEpochCondition|null); + + /** TaskTrigger cron */ + cron?: (aggregator.ICronCondition|null); + + /** TaskTrigger block */ + block?: (aggregator.IBlockCondition|null); + + /** TaskTrigger event */ + event?: (aggregator.IEventCondition|null); + } + + /** Represents a TaskTrigger. */ + class TaskTrigger implements ITaskTrigger { + + /** + * Constructs a new TaskTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ITaskTrigger); + + /** TaskTrigger triggerType. */ + public triggerType: aggregator.TriggerType; + + /** TaskTrigger manual. */ + public manual?: (boolean|null); + + /** TaskTrigger at. */ + public at?: (aggregator.IFixedEpochCondition|null); + + /** TaskTrigger cron. */ + public cron?: (aggregator.ICronCondition|null); + + /** TaskTrigger block. */ + public block?: (aggregator.IBlockCondition|null); + + /** TaskTrigger event. */ + public event?: (aggregator.IEventCondition|null); + + /** TaskTrigger triggerCondition. */ + public triggerCondition?: ("manual"|"at"|"cron"|"block"|"event"); + + /** + * Creates a new TaskTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskTrigger instance + */ + public static create(properties?: aggregator.ITaskTrigger): aggregator.TaskTrigger; + + /** + * Encodes the specified TaskTrigger message. Does not implicitly {@link aggregator.TaskTrigger.verify|verify} messages. + * @param message TaskTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ITaskTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskTrigger message, length delimited. Does not implicitly {@link aggregator.TaskTrigger.verify|verify} messages. + * @param message TaskTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ITaskTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.TaskTrigger; + + /** + * Decodes a TaskTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.TaskTrigger; + + /** + * Verifies a TaskTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskTrigger + */ + public static fromObject(object: { [k: string]: any }): aggregator.TaskTrigger; + + /** + * Creates a plain object from a TaskTrigger message. Also converts values to other types if specified. + * @param message TaskTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.TaskTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Error enum. */ + enum Error { + UnknowError = 0, + RpcNodeError = 1000, + StorageUnavailable = 2000, + StorageWriteError = 2001, + SmartWalletRpcError = 6000, + SmartWalletNotFoundError = 6001, + TaskDataCorrupted = 7000, + TaskDataMissingError = 7001 + } + + /** Properties of a SyncTasksResp. */ + interface ISyncTasksResp { + + /** SyncTasksResp id */ + id?: (string|null); + + /** SyncTasksResp checkType */ + checkType?: (string|null); + + /** SyncTasksResp trigger */ + trigger?: (aggregator.ITaskTrigger|null); + } + + /** Represents a SyncTasksResp. */ + class SyncTasksResp implements ISyncTasksResp { + + /** + * Constructs a new SyncTasksResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ISyncTasksResp); + + /** SyncTasksResp id. */ + public id: string; + + /** SyncTasksResp checkType. */ + public checkType: string; + + /** SyncTasksResp trigger. */ + public trigger?: (aggregator.ITaskTrigger|null); + + /** + * Creates a new SyncTasksResp instance using the specified properties. + * @param [properties] Properties to set + * @returns SyncTasksResp instance + */ + public static create(properties?: aggregator.ISyncTasksResp): aggregator.SyncTasksResp; + + /** + * Encodes the specified SyncTasksResp message. Does not implicitly {@link aggregator.SyncTasksResp.verify|verify} messages. + * @param message SyncTasksResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ISyncTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SyncTasksResp message, length delimited. Does not implicitly {@link aggregator.SyncTasksResp.verify|verify} messages. + * @param message SyncTasksResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ISyncTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SyncTasksResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SyncTasksResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.SyncTasksResp; + + /** + * Decodes a SyncTasksResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SyncTasksResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.SyncTasksResp; + + /** + * Verifies a SyncTasksResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SyncTasksResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SyncTasksResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.SyncTasksResp; + + /** + * Creates a plain object from a SyncTasksResp message. Also converts values to other types if specified. + * @param message SyncTasksResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.SyncTasksResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SyncTasksResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SyncTasksResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** TaskStatus enum. */ + enum TaskStatus { + Active = 0, + Completed = 1, + Failed = 2, + Canceled = 3, + Executing = 4 + } + + /** Properties of a ETHTransferNode. */ + interface IETHTransferNode { + + /** ETHTransferNode destination */ + destination?: (string|null); + + /** ETHTransferNode amount */ + amount?: (string|null); + } + + /** Represents a ETHTransferNode. */ + class ETHTransferNode implements IETHTransferNode { + + /** + * Constructs a new ETHTransferNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IETHTransferNode); + + /** ETHTransferNode destination. */ + public destination: string; + + /** ETHTransferNode amount. */ + public amount: string; + + /** + * Creates a new ETHTransferNode instance using the specified properties. + * @param [properties] Properties to set + * @returns ETHTransferNode instance + */ + public static create(properties?: aggregator.IETHTransferNode): aggregator.ETHTransferNode; + + /** + * Encodes the specified ETHTransferNode message. Does not implicitly {@link aggregator.ETHTransferNode.verify|verify} messages. + * @param message ETHTransferNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IETHTransferNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ETHTransferNode message, length delimited. Does not implicitly {@link aggregator.ETHTransferNode.verify|verify} messages. + * @param message ETHTransferNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IETHTransferNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ETHTransferNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ETHTransferNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ETHTransferNode; + + /** + * Decodes a ETHTransferNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ETHTransferNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ETHTransferNode; + + /** + * Verifies a ETHTransferNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ETHTransferNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ETHTransferNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.ETHTransferNode; + + /** + * Creates a plain object from a ETHTransferNode message. Also converts values to other types if specified. + * @param message ETHTransferNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.ETHTransferNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ETHTransferNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ETHTransferNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContractWriteNode. */ + interface IContractWriteNode { + + /** ContractWriteNode contractAddress */ + contractAddress?: (string|null); + + /** ContractWriteNode callData */ + callData?: (string|null); + + /** ContractWriteNode contractAbi */ + contractAbi?: (string|null); + } + + /** Represents a ContractWriteNode. */ + class ContractWriteNode implements IContractWriteNode { + + /** + * Constructs a new ContractWriteNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IContractWriteNode); + + /** ContractWriteNode contractAddress. */ + public contractAddress: string; + + /** ContractWriteNode callData. */ + public callData: string; + + /** ContractWriteNode contractAbi. */ + public contractAbi: string; + + /** + * Creates a new ContractWriteNode instance using the specified properties. + * @param [properties] Properties to set + * @returns ContractWriteNode instance + */ + public static create(properties?: aggregator.IContractWriteNode): aggregator.ContractWriteNode; + + /** + * Encodes the specified ContractWriteNode message. Does not implicitly {@link aggregator.ContractWriteNode.verify|verify} messages. + * @param message ContractWriteNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IContractWriteNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContractWriteNode message, length delimited. Does not implicitly {@link aggregator.ContractWriteNode.verify|verify} messages. + * @param message ContractWriteNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IContractWriteNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContractWriteNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContractWriteNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ContractWriteNode; + + /** + * Decodes a ContractWriteNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContractWriteNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ContractWriteNode; + + /** + * Verifies a ContractWriteNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContractWriteNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContractWriteNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.ContractWriteNode; + + /** + * Creates a plain object from a ContractWriteNode message. Also converts values to other types if specified. + * @param message ContractWriteNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.ContractWriteNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContractWriteNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContractWriteNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContractQueryNode. */ + interface IContractQueryNode { + + /** ContractQueryNode contractAddress */ + contractAddress?: (string|null); + + /** ContractQueryNode callData */ + callData?: (string|null); + + /** ContractQueryNode contractAbi */ + contractAbi?: (string|null); + } + + /** Represents a ContractQueryNode. */ + class ContractQueryNode implements IContractQueryNode { + + /** + * Constructs a new ContractQueryNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IContractQueryNode); + + /** ContractQueryNode contractAddress. */ + public contractAddress: string; + + /** ContractQueryNode callData. */ + public callData: string; + + /** ContractQueryNode contractAbi. */ + public contractAbi: string; + + /** + * Creates a new ContractQueryNode instance using the specified properties. + * @param [properties] Properties to set + * @returns ContractQueryNode instance + */ + public static create(properties?: aggregator.IContractQueryNode): aggregator.ContractQueryNode; + + /** + * Encodes the specified ContractQueryNode message. Does not implicitly {@link aggregator.ContractQueryNode.verify|verify} messages. + * @param message ContractQueryNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IContractQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContractQueryNode message, length delimited. Does not implicitly {@link aggregator.ContractQueryNode.verify|verify} messages. + * @param message ContractQueryNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IContractQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContractQueryNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContractQueryNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ContractQueryNode; + + /** + * Decodes a ContractQueryNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContractQueryNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ContractQueryNode; + + /** + * Verifies a ContractQueryNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContractQueryNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContractQueryNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.ContractQueryNode; + + /** + * Creates a plain object from a ContractQueryNode message. Also converts values to other types if specified. + * @param message ContractQueryNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.ContractQueryNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContractQueryNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContractQueryNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GraphQLQueryNode. */ + interface IGraphQLQueryNode { + + /** GraphQLQueryNode url */ + url?: (string|null); + + /** GraphQLQueryNode query */ + query?: (string|null); + } + + /** Represents a GraphQLQueryNode. */ + class GraphQLQueryNode implements IGraphQLQueryNode { + + /** + * Constructs a new GraphQLQueryNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IGraphQLQueryNode); + + /** GraphQLQueryNode url. */ + public url: string; + + /** GraphQLQueryNode query. */ + public query: string; + + /** + * Creates a new GraphQLQueryNode instance using the specified properties. + * @param [properties] Properties to set + * @returns GraphQLQueryNode instance + */ + public static create(properties?: aggregator.IGraphQLQueryNode): aggregator.GraphQLQueryNode; + + /** + * Encodes the specified GraphQLQueryNode message. Does not implicitly {@link aggregator.GraphQLQueryNode.verify|verify} messages. + * @param message GraphQLQueryNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IGraphQLQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GraphQLQueryNode message, length delimited. Does not implicitly {@link aggregator.GraphQLQueryNode.verify|verify} messages. + * @param message GraphQLQueryNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IGraphQLQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GraphQLQueryNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GraphQLQueryNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.GraphQLQueryNode; + + /** + * Decodes a GraphQLQueryNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GraphQLQueryNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.GraphQLQueryNode; + + /** + * Verifies a GraphQLQueryNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GraphQLQueryNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GraphQLQueryNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.GraphQLQueryNode; + + /** + * Creates a plain object from a GraphQLQueryNode message. Also converts values to other types if specified. + * @param message GraphQLQueryNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.GraphQLQueryNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GraphQLQueryNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GraphQLQueryNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestAPINode. */ + interface IRestAPINode { + + /** RestAPINode url */ + url?: (string|null); + + /** RestAPINode headers */ + headers?: ({ [k: string]: string }|null); + + /** RestAPINode body */ + body?: (string|null); + + /** RestAPINode method */ + method?: (string|null); + } + + /** Represents a RestAPINode. */ + class RestAPINode implements IRestAPINode { + + /** + * Constructs a new RestAPINode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IRestAPINode); + + /** RestAPINode url. */ + public url: string; + + /** RestAPINode headers. */ + public headers: { [k: string]: string }; + + /** RestAPINode body. */ + public body: string; + + /** RestAPINode method. */ + public method: string; + + /** + * Creates a new RestAPINode instance using the specified properties. + * @param [properties] Properties to set + * @returns RestAPINode instance + */ + public static create(properties?: aggregator.IRestAPINode): aggregator.RestAPINode; + + /** + * Encodes the specified RestAPINode message. Does not implicitly {@link aggregator.RestAPINode.verify|verify} messages. + * @param message RestAPINode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IRestAPINode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestAPINode message, length delimited. Does not implicitly {@link aggregator.RestAPINode.verify|verify} messages. + * @param message RestAPINode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IRestAPINode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestAPINode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestAPINode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.RestAPINode; + + /** + * Decodes a RestAPINode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestAPINode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.RestAPINode; + + /** + * Verifies a RestAPINode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestAPINode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestAPINode + */ + public static fromObject(object: { [k: string]: any }): aggregator.RestAPINode; + + /** + * Creates a plain object from a RestAPINode message. Also converts values to other types if specified. + * @param message RestAPINode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.RestAPINode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestAPINode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestAPINode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** CustomCodeType enum. */ + enum CustomCodeType { + JavaScript = 0 + } + + /** Properties of a CustomCodeNode. */ + interface ICustomCodeNode { + + /** CustomCodeNode type */ + type?: (aggregator.CustomCodeType|null); + + /** CustomCodeNode source */ + source?: (string|null); + } + + /** Represents a CustomCodeNode. */ + class CustomCodeNode implements ICustomCodeNode { + + /** + * Constructs a new CustomCodeNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICustomCodeNode); + + /** CustomCodeNode type. */ + public type: aggregator.CustomCodeType; + + /** CustomCodeNode source. */ + public source: string; + + /** + * Creates a new CustomCodeNode instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomCodeNode instance + */ + public static create(properties?: aggregator.ICustomCodeNode): aggregator.CustomCodeNode; + + /** + * Encodes the specified CustomCodeNode message. Does not implicitly {@link aggregator.CustomCodeNode.verify|verify} messages. + * @param message CustomCodeNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICustomCodeNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomCodeNode message, length delimited. Does not implicitly {@link aggregator.CustomCodeNode.verify|verify} messages. + * @param message CustomCodeNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICustomCodeNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomCodeNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomCodeNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CustomCodeNode; + + /** + * Decodes a CustomCodeNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomCodeNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CustomCodeNode; + + /** + * Verifies a CustomCodeNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomCodeNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomCodeNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.CustomCodeNode; + + /** + * Creates a plain object from a CustomCodeNode message. Also converts values to other types if specified. + * @param message CustomCodeNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CustomCodeNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomCodeNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomCodeNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConditionJump. */ + interface IConditionJump { + + /** ConditionJump expression */ + expression?: (string|null); + + /** ConditionJump next */ + next?: (string|null); + } + + /** Represents a ConditionJump. */ + class ConditionJump implements IConditionJump { + + /** + * Constructs a new ConditionJump. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IConditionJump); + + /** ConditionJump expression. */ + public expression: string; + + /** ConditionJump next. */ + public next: string; + + /** + * Creates a new ConditionJump instance using the specified properties. + * @param [properties] Properties to set + * @returns ConditionJump instance + */ + public static create(properties?: aggregator.IConditionJump): aggregator.ConditionJump; + + /** + * Encodes the specified ConditionJump message. Does not implicitly {@link aggregator.ConditionJump.verify|verify} messages. + * @param message ConditionJump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IConditionJump, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConditionJump message, length delimited. Does not implicitly {@link aggregator.ConditionJump.verify|verify} messages. + * @param message ConditionJump message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IConditionJump, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConditionJump message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConditionJump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ConditionJump; + + /** + * Decodes a ConditionJump message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConditionJump + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ConditionJump; + + /** + * Verifies a ConditionJump message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConditionJump message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConditionJump + */ + public static fromObject(object: { [k: string]: any }): aggregator.ConditionJump; + + /** + * Creates a plain object from a ConditionJump message. Also converts values to other types if specified. + * @param message ConditionJump + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.ConditionJump, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConditionJump to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConditionJump + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BranchNode. */ + interface IBranchNode { + + /** BranchNode if */ + "if"?: (aggregator.IConditionJump|null); + + /** BranchNode elseIfs */ + elseIfs?: (aggregator.IConditionJump[]|null); + + /** BranchNode else */ + "else"?: (aggregator.IConditionJump|null); + } + + /** Represents a BranchNode. */ + class BranchNode implements IBranchNode { + + /** + * Constructs a new BranchNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IBranchNode); + + /** BranchNode if. */ + public if?: (aggregator.IConditionJump|null); + + /** BranchNode elseIfs. */ + public elseIfs: aggregator.IConditionJump[]; + + /** BranchNode else. */ + public else?: (aggregator.IConditionJump|null); + + /** + * Creates a new BranchNode instance using the specified properties. + * @param [properties] Properties to set + * @returns BranchNode instance + */ + public static create(properties?: aggregator.IBranchNode): aggregator.BranchNode; + + /** + * Encodes the specified BranchNode message. Does not implicitly {@link aggregator.BranchNode.verify|verify} messages. + * @param message BranchNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IBranchNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BranchNode message, length delimited. Does not implicitly {@link aggregator.BranchNode.verify|verify} messages. + * @param message BranchNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IBranchNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BranchNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BranchNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.BranchNode; + + /** + * Decodes a BranchNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BranchNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.BranchNode; + + /** + * Verifies a BranchNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BranchNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BranchNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.BranchNode; + + /** + * Creates a plain object from a BranchNode message. Also converts values to other types if specified. + * @param message BranchNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.BranchNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BranchNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BranchNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FilterNode. */ + interface IFilterNode { + + /** FilterNode expression */ + expression?: (string|null); + } + + /** Represents a FilterNode. */ + class FilterNode implements IFilterNode { + + /** + * Constructs a new FilterNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IFilterNode); + + /** FilterNode expression. */ + public expression: string; + + /** + * Creates a new FilterNode instance using the specified properties. + * @param [properties] Properties to set + * @returns FilterNode instance + */ + public static create(properties?: aggregator.IFilterNode): aggregator.FilterNode; + + /** + * Encodes the specified FilterNode message. Does not implicitly {@link aggregator.FilterNode.verify|verify} messages. + * @param message FilterNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IFilterNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FilterNode message, length delimited. Does not implicitly {@link aggregator.FilterNode.verify|verify} messages. + * @param message FilterNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IFilterNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FilterNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FilterNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.FilterNode; + + /** + * Decodes a FilterNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FilterNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.FilterNode; + + /** + * Verifies a FilterNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FilterNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FilterNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.FilterNode; + + /** + * Creates a plain object from a FilterNode message. Also converts values to other types if specified. + * @param message FilterNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.FilterNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FilterNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FilterNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TaskEdge. */ + interface ITaskEdge { + + /** TaskEdge id */ + id?: (string|null); + + /** TaskEdge source */ + source?: (string|null); + + /** TaskEdge target */ + target?: (string|null); + } + + /** Represents a TaskEdge. */ + class TaskEdge implements ITaskEdge { + + /** + * Constructs a new TaskEdge. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ITaskEdge); + + /** TaskEdge id. */ + public id: string; + + /** TaskEdge source. */ + public source: string; + + /** TaskEdge target. */ + public target: string; + + /** + * Creates a new TaskEdge instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskEdge instance + */ + public static create(properties?: aggregator.ITaskEdge): aggregator.TaskEdge; + + /** + * Encodes the specified TaskEdge message. Does not implicitly {@link aggregator.TaskEdge.verify|verify} messages. + * @param message TaskEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ITaskEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskEdge message, length delimited. Does not implicitly {@link aggregator.TaskEdge.verify|verify} messages. + * @param message TaskEdge message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ITaskEdge, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskEdge message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.TaskEdge; + + /** + * Decodes a TaskEdge message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskEdge + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.TaskEdge; + + /** + * Verifies a TaskEdge message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskEdge message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskEdge + */ + public static fromObject(object: { [k: string]: any }): aggregator.TaskEdge; + + /** + * Creates a plain object from a TaskEdge message. Also converts values to other types if specified. + * @param message TaskEdge + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.TaskEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskEdge to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskEdge + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** TaskType enum. */ + enum TaskType { + ETHTransferTask = 0, + ContractWriteTask = 1, + ContractReadTask = 2, + GraphQLDataQueryTask = 3, + RestAPITask = 4, + BranchTask = 5, + FilterTask = 6, + CustomCodeTask = 7 + } + + /** Properties of a TaskNode. */ + interface ITaskNode { + + /** TaskNode nodeType */ + nodeType?: (aggregator.TaskType|null); + + /** TaskNode id */ + id?: (string|null); + + /** TaskNode name */ + name?: (string|null); + + /** TaskNode ethTransfer */ + ethTransfer?: (aggregator.IETHTransferNode|null); + + /** TaskNode contractWrite */ + contractWrite?: (aggregator.IContractWriteNode|null); + + /** TaskNode contractRead */ + contractRead?: (aggregator.IContractQueryNode|null); + + /** TaskNode graphqlDataQuery */ + graphqlDataQuery?: (aggregator.IGraphQLQueryNode|null); + + /** TaskNode restApi */ + restApi?: (aggregator.IRestAPINode|null); + + /** TaskNode branch */ + branch?: (aggregator.IBranchNode|null); + + /** TaskNode filter */ + filter?: (aggregator.IFilterNode|null); + + /** TaskNode customCode */ + customCode?: (aggregator.ICustomCodeNode|null); + } + + /** Represents a TaskNode. */ + class TaskNode implements ITaskNode { + + /** + * Constructs a new TaskNode. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ITaskNode); + + /** TaskNode nodeType. */ + public nodeType: aggregator.TaskType; + + /** TaskNode id. */ + public id: string; + + /** TaskNode name. */ + public name: string; + + /** TaskNode ethTransfer. */ + public ethTransfer?: (aggregator.IETHTransferNode|null); + + /** TaskNode contractWrite. */ + public contractWrite?: (aggregator.IContractWriteNode|null); + + /** TaskNode contractRead. */ + public contractRead?: (aggregator.IContractQueryNode|null); + + /** TaskNode graphqlDataQuery. */ + public graphqlDataQuery?: (aggregator.IGraphQLQueryNode|null); + + /** TaskNode restApi. */ + public restApi?: (aggregator.IRestAPINode|null); + + /** TaskNode branch. */ + public branch?: (aggregator.IBranchNode|null); + + /** TaskNode filter. */ + public filter?: (aggregator.IFilterNode|null); + + /** TaskNode customCode. */ + public customCode?: (aggregator.ICustomCodeNode|null); + + /** TaskNode taskBody. */ + public taskBody?: ("ethTransfer"|"contractWrite"|"contractRead"|"graphqlDataQuery"|"restApi"|"branch"|"filter"|"customCode"); + + /** + * Creates a new TaskNode instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskNode instance + */ + public static create(properties?: aggregator.ITaskNode): aggregator.TaskNode; + + /** + * Encodes the specified TaskNode message. Does not implicitly {@link aggregator.TaskNode.verify|verify} messages. + * @param message TaskNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ITaskNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskNode message, length delimited. Does not implicitly {@link aggregator.TaskNode.verify|verify} messages. + * @param message TaskNode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ITaskNode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskNode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.TaskNode; + + /** + * Decodes a TaskNode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskNode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.TaskNode; + + /** + * Verifies a TaskNode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskNode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskNode + */ + public static fromObject(object: { [k: string]: any }): aggregator.TaskNode; + + /** + * Creates a plain object from a TaskNode message. Also converts values to other types if specified. + * @param message TaskNode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.TaskNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskNode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskNode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Execution. */ + interface IExecution { + + /** Execution epoch */ + epoch?: (number|Long|null); + + /** Execution userOpHash */ + userOpHash?: (string|null); + + /** Execution error */ + error?: (string|null); + } + + /** Represents an Execution. */ + class Execution implements IExecution { + + /** + * Constructs a new Execution. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IExecution); + + /** Execution epoch. */ + public epoch: (number|Long); + + /** Execution userOpHash. */ + public userOpHash: string; + + /** Execution error. */ + public error: string; + + /** + * Creates a new Execution instance using the specified properties. + * @param [properties] Properties to set + * @returns Execution instance + */ + public static create(properties?: aggregator.IExecution): aggregator.Execution; + + /** + * Encodes the specified Execution message. Does not implicitly {@link aggregator.Execution.verify|verify} messages. + * @param message Execution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IExecution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Execution message, length delimited. Does not implicitly {@link aggregator.Execution.verify|verify} messages. + * @param message Execution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IExecution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Execution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Execution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Execution; + + /** + * Decodes an Execution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Execution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Execution; + + /** + * Verifies an Execution message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Execution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Execution + */ + public static fromObject(object: { [k: string]: any }): aggregator.Execution; + + /** + * Creates a plain object from an Execution message. Also converts values to other types if specified. + * @param message Execution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.Execution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Execution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Execution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Task. */ + interface ITask { + + /** Task id */ + id?: (aggregator.IUUID|null); + + /** Task owner */ + owner?: (string|null); + + /** Task smartWalletAddress */ + smartWalletAddress?: (string|null); + + /** Task startAt */ + startAt?: (number|Long|null); + + /** Task expiredAt */ + expiredAt?: (number|Long|null); + + /** Task memo */ + memo?: (string|null); + + /** Task completedAt */ + completedAt?: (number|Long|null); + + /** Task recurring */ + recurring?: (boolean|null); + + /** Task status */ + status?: (aggregator.TaskStatus|null); + + /** Task trigger */ + trigger?: (aggregator.ITaskTrigger|null); + + /** Task nodes */ + nodes?: (aggregator.ITaskNode[]|null); + + /** Task edges */ + edges?: (aggregator.ITaskEdge[]|null); + + /** Task executions */ + executions?: (aggregator.IExecution[]|null); + } + + /** Represents a Task. */ + class Task implements ITask { + + /** + * Constructs a new Task. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ITask); + + /** Task id. */ + public id?: (aggregator.IUUID|null); + + /** Task owner. */ + public owner: string; + + /** Task smartWalletAddress. */ + public smartWalletAddress: string; + + /** Task startAt. */ + public startAt: (number|Long); + + /** Task expiredAt. */ + public expiredAt: (number|Long); + + /** Task memo. */ + public memo: string; + + /** Task completedAt. */ + public completedAt: (number|Long); + + /** Task recurring. */ + public recurring: boolean; + + /** Task status. */ + public status: aggregator.TaskStatus; + + /** Task trigger. */ + public trigger?: (aggregator.ITaskTrigger|null); + + /** Task nodes. */ + public nodes: aggregator.ITaskNode[]; + + /** Task edges. */ + public edges: aggregator.ITaskEdge[]; + + /** Task executions. */ + public executions: aggregator.IExecution[]; + + /** + * Creates a new Task instance using the specified properties. + * @param [properties] Properties to set + * @returns Task instance + */ + public static create(properties?: aggregator.ITask): aggregator.Task; + + /** + * Encodes the specified Task message. Does not implicitly {@link aggregator.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Task message, length delimited. Does not implicitly {@link aggregator.Task.verify|verify} messages. + * @param message Task message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ITask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Task message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Task; + + /** + * Decodes a Task message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Task + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Task; + + /** + * Verifies a Task message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Task message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Task + */ + public static fromObject(object: { [k: string]: any }): aggregator.Task; + + /** + * Creates a plain object from a Task message. Also converts values to other types if specified. + * @param message Task + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Task to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Task + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTaskReq. */ + interface ICreateTaskReq { + + /** CreateTaskReq trigger */ + trigger?: (aggregator.ITaskTrigger|null); + + /** CreateTaskReq startAt */ + startAt?: (number|Long|null); + + /** CreateTaskReq expiredAt */ + expiredAt?: (number|Long|null); + + /** CreateTaskReq repeatable */ + repeatable?: (boolean|null); + + /** CreateTaskReq smartWalletAddress */ + smartWalletAddress?: (string|null); + + /** CreateTaskReq memo */ + memo?: (string|null); + + /** CreateTaskReq nodes */ + nodes?: (aggregator.ITaskNode[]|null); + + /** CreateTaskReq edges */ + edges?: (aggregator.ITaskEdge[]|null); + } + + /** Represents a CreateTaskReq. */ + class CreateTaskReq implements ICreateTaskReq { + + /** + * Constructs a new CreateTaskReq. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICreateTaskReq); + + /** CreateTaskReq trigger. */ + public trigger?: (aggregator.ITaskTrigger|null); + + /** CreateTaskReq startAt. */ + public startAt: (number|Long); + + /** CreateTaskReq expiredAt. */ + public expiredAt: (number|Long); + + /** CreateTaskReq repeatable. */ + public repeatable: boolean; + + /** CreateTaskReq smartWalletAddress. */ + public smartWalletAddress: string; + + /** CreateTaskReq memo. */ + public memo: string; + + /** CreateTaskReq nodes. */ + public nodes: aggregator.ITaskNode[]; + + /** CreateTaskReq edges. */ + public edges: aggregator.ITaskEdge[]; + + /** + * Creates a new CreateTaskReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaskReq instance + */ + public static create(properties?: aggregator.ICreateTaskReq): aggregator.CreateTaskReq; + + /** + * Encodes the specified CreateTaskReq message. Does not implicitly {@link aggregator.CreateTaskReq.verify|verify} messages. + * @param message CreateTaskReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICreateTaskReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTaskReq message, length delimited. Does not implicitly {@link aggregator.CreateTaskReq.verify|verify} messages. + * @param message CreateTaskReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICreateTaskReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTaskReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaskReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateTaskReq; + + /** + * Decodes a CreateTaskReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaskReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateTaskReq; + + /** + * Verifies a CreateTaskReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTaskReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaskReq + */ + public static fromObject(object: { [k: string]: any }): aggregator.CreateTaskReq; + + /** + * Creates a plain object from a CreateTaskReq message. Also converts values to other types if specified. + * @param message CreateTaskReq + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CreateTaskReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTaskReq to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTaskReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateTaskResp. */ + interface ICreateTaskResp { + + /** CreateTaskResp id */ + id?: (string|null); + } + + /** Represents a CreateTaskResp. */ + class CreateTaskResp implements ICreateTaskResp { + + /** + * Constructs a new CreateTaskResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICreateTaskResp); + + /** CreateTaskResp id. */ + public id: string; + + /** + * Creates a new CreateTaskResp instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateTaskResp instance + */ + public static create(properties?: aggregator.ICreateTaskResp): aggregator.CreateTaskResp; + + /** + * Encodes the specified CreateTaskResp message. Does not implicitly {@link aggregator.CreateTaskResp.verify|verify} messages. + * @param message CreateTaskResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICreateTaskResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateTaskResp message, length delimited. Does not implicitly {@link aggregator.CreateTaskResp.verify|verify} messages. + * @param message CreateTaskResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICreateTaskResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateTaskResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateTaskResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateTaskResp; + + /** + * Decodes a CreateTaskResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateTaskResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateTaskResp; + + /** + * Verifies a CreateTaskResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateTaskResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateTaskResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.CreateTaskResp; + + /** + * Creates a plain object from a CreateTaskResp message. Also converts values to other types if specified. + * @param message CreateTaskResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CreateTaskResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateTaskResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateTaskResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NonceRequest. */ + interface INonceRequest { + + /** NonceRequest owner */ + owner?: (string|null); + } + + /** Represents a NonceRequest. */ + class NonceRequest implements INonceRequest { + + /** + * Constructs a new NonceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.INonceRequest); + + /** NonceRequest owner. */ + public owner: string; + + /** + * Creates a new NonceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns NonceRequest instance + */ + public static create(properties?: aggregator.INonceRequest): aggregator.NonceRequest; + + /** + * Encodes the specified NonceRequest message. Does not implicitly {@link aggregator.NonceRequest.verify|verify} messages. + * @param message NonceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.INonceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NonceRequest message, length delimited. Does not implicitly {@link aggregator.NonceRequest.verify|verify} messages. + * @param message NonceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.INonceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NonceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NonceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.NonceRequest; + + /** + * Decodes a NonceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NonceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.NonceRequest; + + /** + * Verifies a NonceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NonceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NonceRequest + */ + public static fromObject(object: { [k: string]: any }): aggregator.NonceRequest; + + /** + * Creates a plain object from a NonceRequest message. Also converts values to other types if specified. + * @param message NonceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.NonceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NonceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NonceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NonceResp. */ + interface INonceResp { + + /** NonceResp nonce */ + nonce?: (string|null); + } + + /** Represents a NonceResp. */ + class NonceResp implements INonceResp { + + /** + * Constructs a new NonceResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.INonceResp); + + /** NonceResp nonce. */ + public nonce: string; + + /** + * Creates a new NonceResp instance using the specified properties. + * @param [properties] Properties to set + * @returns NonceResp instance + */ + public static create(properties?: aggregator.INonceResp): aggregator.NonceResp; + + /** + * Encodes the specified NonceResp message. Does not implicitly {@link aggregator.NonceResp.verify|verify} messages. + * @param message NonceResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.INonceResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NonceResp message, length delimited. Does not implicitly {@link aggregator.NonceResp.verify|verify} messages. + * @param message NonceResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.INonceResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NonceResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NonceResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.NonceResp; + + /** + * Decodes a NonceResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NonceResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.NonceResp; + + /** + * Verifies a NonceResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NonceResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NonceResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.NonceResp; + + /** + * Creates a plain object from a NonceResp message. Also converts values to other types if specified. + * @param message NonceResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.NonceResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NonceResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NonceResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddressRequest. */ + interface IAddressRequest { + + /** AddressRequest factory */ + factory?: (string|null); + + /** AddressRequest salt */ + salt?: (string|null); + } + + /** Represents an AddressRequest. */ + class AddressRequest implements IAddressRequest { + + /** + * Constructs a new AddressRequest. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IAddressRequest); + + /** AddressRequest factory. */ + public factory: string; + + /** AddressRequest salt. */ + public salt: string; + + /** + * Creates a new AddressRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AddressRequest instance + */ + public static create(properties?: aggregator.IAddressRequest): aggregator.AddressRequest; + + /** + * Encodes the specified AddressRequest message. Does not implicitly {@link aggregator.AddressRequest.verify|verify} messages. + * @param message AddressRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddressRequest message, length delimited. Does not implicitly {@link aggregator.AddressRequest.verify|verify} messages. + * @param message AddressRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddressRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddressRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.AddressRequest; + + /** + * Decodes an AddressRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddressRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.AddressRequest; + + /** + * Verifies an AddressRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddressRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddressRequest + */ + public static fromObject(object: { [k: string]: any }): aggregator.AddressRequest; + + /** + * Creates a plain object from an AddressRequest message. Also converts values to other types if specified. + * @param message AddressRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.AddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddressRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddressRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SmartWallet. */ + interface ISmartWallet { + + /** SmartWallet address */ + address?: (string|null); + + /** SmartWallet salt */ + salt?: (string|null); + + /** SmartWallet factory */ + factory?: (string|null); + } + + /** Represents a SmartWallet. */ + class SmartWallet implements ISmartWallet { + + /** + * Constructs a new SmartWallet. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ISmartWallet); + + /** SmartWallet address. */ + public address: string; + + /** SmartWallet salt. */ + public salt: string; + + /** SmartWallet factory. */ + public factory: string; + + /** + * Creates a new SmartWallet instance using the specified properties. + * @param [properties] Properties to set + * @returns SmartWallet instance + */ + public static create(properties?: aggregator.ISmartWallet): aggregator.SmartWallet; + + /** + * Encodes the specified SmartWallet message. Does not implicitly {@link aggregator.SmartWallet.verify|verify} messages. + * @param message SmartWallet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ISmartWallet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SmartWallet message, length delimited. Does not implicitly {@link aggregator.SmartWallet.verify|verify} messages. + * @param message SmartWallet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ISmartWallet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SmartWallet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SmartWallet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.SmartWallet; + + /** + * Decodes a SmartWallet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SmartWallet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.SmartWallet; + + /** + * Verifies a SmartWallet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SmartWallet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SmartWallet + */ + public static fromObject(object: { [k: string]: any }): aggregator.SmartWallet; + + /** + * Creates a plain object from a SmartWallet message. Also converts values to other types if specified. + * @param message SmartWallet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.SmartWallet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SmartWallet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SmartWallet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddressResp. */ + interface IAddressResp { + + /** AddressResp wallets */ + wallets?: (aggregator.ISmartWallet[]|null); + } + + /** Represents an AddressResp. */ + class AddressResp implements IAddressResp { + + /** + * Constructs a new AddressResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IAddressResp); + + /** AddressResp wallets. */ + public wallets: aggregator.ISmartWallet[]; + + /** + * Creates a new AddressResp instance using the specified properties. + * @param [properties] Properties to set + * @returns AddressResp instance + */ + public static create(properties?: aggregator.IAddressResp): aggregator.AddressResp; + + /** + * Encodes the specified AddressResp message. Does not implicitly {@link aggregator.AddressResp.verify|verify} messages. + * @param message AddressResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IAddressResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddressResp message, length delimited. Does not implicitly {@link aggregator.AddressResp.verify|verify} messages. + * @param message AddressResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IAddressResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddressResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddressResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.AddressResp; + + /** + * Decodes an AddressResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddressResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.AddressResp; + + /** + * Verifies an AddressResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddressResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddressResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.AddressResp; + + /** + * Creates a plain object from an AddressResp message. Also converts values to other types if specified. + * @param message AddressResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.AddressResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddressResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddressResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTasksReq. */ + interface IListTasksReq { + + /** ListTasksReq smartWalletAddress */ + smartWalletAddress?: (string|null); + } + + /** Represents a ListTasksReq. */ + class ListTasksReq implements IListTasksReq { + + /** + * Constructs a new ListTasksReq. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IListTasksReq); + + /** ListTasksReq smartWalletAddress. */ + public smartWalletAddress: string; + + /** + * Creates a new ListTasksReq instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksReq instance + */ + public static create(properties?: aggregator.IListTasksReq): aggregator.ListTasksReq; + + /** + * Encodes the specified ListTasksReq message. Does not implicitly {@link aggregator.ListTasksReq.verify|verify} messages. + * @param message ListTasksReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IListTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksReq message, length delimited. Does not implicitly {@link aggregator.ListTasksReq.verify|verify} messages. + * @param message ListTasksReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IListTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ListTasksReq; + + /** + * Decodes a ListTasksReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ListTasksReq; + + /** + * Verifies a ListTasksReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksReq + */ + public static fromObject(object: { [k: string]: any }): aggregator.ListTasksReq; + + /** + * Creates a plain object from a ListTasksReq message. Also converts values to other types if specified. + * @param message ListTasksReq + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.ListTasksReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksReq to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTasksReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTasksResp. */ + interface IListTasksResp { + + /** ListTasksResp tasks */ + tasks?: (aggregator.ITask[]|null); + } + + /** Represents a ListTasksResp. */ + class ListTasksResp implements IListTasksResp { + + /** + * Constructs a new ListTasksResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IListTasksResp); + + /** ListTasksResp tasks. */ + public tasks: aggregator.ITask[]; + + /** + * Creates a new ListTasksResp instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTasksResp instance + */ + public static create(properties?: aggregator.IListTasksResp): aggregator.ListTasksResp; + + /** + * Encodes the specified ListTasksResp message. Does not implicitly {@link aggregator.ListTasksResp.verify|verify} messages. + * @param message ListTasksResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IListTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTasksResp message, length delimited. Does not implicitly {@link aggregator.ListTasksResp.verify|verify} messages. + * @param message ListTasksResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IListTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTasksResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTasksResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ListTasksResp; + + /** + * Decodes a ListTasksResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTasksResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ListTasksResp; + + /** + * Verifies a ListTasksResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTasksResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTasksResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.ListTasksResp; + + /** + * Creates a plain object from a ListTasksResp message. Also converts values to other types if specified. + * @param message ListTasksResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.ListTasksResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTasksResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTasksResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetKeyReq. */ + interface IGetKeyReq { + + /** GetKeyReq owner */ + owner?: (string|null); + + /** GetKeyReq expiredAt */ + expiredAt?: (number|Long|null); + + /** GetKeyReq signature */ + signature?: (string|null); + } + + /** Represents a GetKeyReq. */ + class GetKeyReq implements IGetKeyReq { + + /** + * Constructs a new GetKeyReq. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IGetKeyReq); + + /** GetKeyReq owner. */ + public owner: string; + + /** GetKeyReq expiredAt. */ + public expiredAt: (number|Long); + + /** GetKeyReq signature. */ + public signature: string; + + /** + * Creates a new GetKeyReq instance using the specified properties. + * @param [properties] Properties to set + * @returns GetKeyReq instance + */ + public static create(properties?: aggregator.IGetKeyReq): aggregator.GetKeyReq; + + /** + * Encodes the specified GetKeyReq message. Does not implicitly {@link aggregator.GetKeyReq.verify|verify} messages. + * @param message GetKeyReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IGetKeyReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetKeyReq message, length delimited. Does not implicitly {@link aggregator.GetKeyReq.verify|verify} messages. + * @param message GetKeyReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IGetKeyReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetKeyReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetKeyReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.GetKeyReq; + + /** + * Decodes a GetKeyReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetKeyReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.GetKeyReq; + + /** + * Verifies a GetKeyReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetKeyReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetKeyReq + */ + public static fromObject(object: { [k: string]: any }): aggregator.GetKeyReq; + + /** + * Creates a plain object from a GetKeyReq message. Also converts values to other types if specified. + * @param message GetKeyReq + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.GetKeyReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetKeyReq to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetKeyReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KeyResp. */ + interface IKeyResp { + + /** KeyResp key */ + key?: (string|null); + } + + /** Represents a KeyResp. */ + class KeyResp implements IKeyResp { + + /** + * Constructs a new KeyResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IKeyResp); + + /** KeyResp key. */ + public key: string; + + /** + * Creates a new KeyResp instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyResp instance + */ + public static create(properties?: aggregator.IKeyResp): aggregator.KeyResp; + + /** + * Encodes the specified KeyResp message. Does not implicitly {@link aggregator.KeyResp.verify|verify} messages. + * @param message KeyResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IKeyResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyResp message, length delimited. Does not implicitly {@link aggregator.KeyResp.verify|verify} messages. + * @param message KeyResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IKeyResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.KeyResp; + + /** + * Decodes a KeyResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.KeyResp; + + /** + * Verifies a KeyResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.KeyResp; + + /** + * Creates a plain object from a KeyResp message. Also converts values to other types if specified. + * @param message KeyResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.KeyResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateChecksReq. */ + interface IUpdateChecksReq { + + /** UpdateChecksReq address */ + address?: (string|null); + + /** UpdateChecksReq signature */ + signature?: (string|null); + + /** UpdateChecksReq id */ + id?: (string[]|null); + } + + /** Represents an UpdateChecksReq. */ + class UpdateChecksReq implements IUpdateChecksReq { + + /** + * Constructs a new UpdateChecksReq. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IUpdateChecksReq); + + /** UpdateChecksReq address. */ + public address: string; + + /** UpdateChecksReq signature. */ + public signature: string; + + /** UpdateChecksReq id. */ + public id: string[]; + + /** + * Creates a new UpdateChecksReq instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateChecksReq instance + */ + public static create(properties?: aggregator.IUpdateChecksReq): aggregator.UpdateChecksReq; + + /** + * Encodes the specified UpdateChecksReq message. Does not implicitly {@link aggregator.UpdateChecksReq.verify|verify} messages. + * @param message UpdateChecksReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IUpdateChecksReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateChecksReq message, length delimited. Does not implicitly {@link aggregator.UpdateChecksReq.verify|verify} messages. + * @param message UpdateChecksReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IUpdateChecksReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateChecksReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateChecksReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.UpdateChecksReq; + + /** + * Decodes an UpdateChecksReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateChecksReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.UpdateChecksReq; + + /** + * Verifies an UpdateChecksReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateChecksReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateChecksReq + */ + public static fromObject(object: { [k: string]: any }): aggregator.UpdateChecksReq; + + /** + * Creates a plain object from an UpdateChecksReq message. Also converts values to other types if specified. + * @param message UpdateChecksReq + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.UpdateChecksReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateChecksReq to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateChecksReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateChecksResp. */ + interface IUpdateChecksResp { + + /** UpdateChecksResp updatedAt */ + updatedAt?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateChecksResp. */ + class UpdateChecksResp implements IUpdateChecksResp { + + /** + * Constructs a new UpdateChecksResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.IUpdateChecksResp); + + /** UpdateChecksResp updatedAt. */ + public updatedAt?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateChecksResp instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateChecksResp instance + */ + public static create(properties?: aggregator.IUpdateChecksResp): aggregator.UpdateChecksResp; + + /** + * Encodes the specified UpdateChecksResp message. Does not implicitly {@link aggregator.UpdateChecksResp.verify|verify} messages. + * @param message UpdateChecksResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.IUpdateChecksResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateChecksResp message, length delimited. Does not implicitly {@link aggregator.UpdateChecksResp.verify|verify} messages. + * @param message UpdateChecksResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.IUpdateChecksResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateChecksResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateChecksResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.UpdateChecksResp; + + /** + * Decodes an UpdateChecksResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateChecksResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.UpdateChecksResp; + + /** + * Verifies an UpdateChecksResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateChecksResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateChecksResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.UpdateChecksResp; + + /** + * Creates a plain object from an UpdateChecksResp message. Also converts values to other types if specified. + * @param message UpdateChecksResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.UpdateChecksResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateChecksResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateChecksResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateWalletReq. */ + interface ICreateWalletReq { + + /** CreateWalletReq salt */ + salt?: (string|null); + + /** CreateWalletReq factoryAddress */ + factoryAddress?: (string|null); + } + + /** Represents a CreateWalletReq. */ + class CreateWalletReq implements ICreateWalletReq { + + /** + * Constructs a new CreateWalletReq. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICreateWalletReq); + + /** CreateWalletReq salt. */ + public salt: string; + + /** CreateWalletReq factoryAddress. */ + public factoryAddress: string; + + /** + * Creates a new CreateWalletReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWalletReq instance + */ + public static create(properties?: aggregator.ICreateWalletReq): aggregator.CreateWalletReq; + + /** + * Encodes the specified CreateWalletReq message. Does not implicitly {@link aggregator.CreateWalletReq.verify|verify} messages. + * @param message CreateWalletReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICreateWalletReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWalletReq message, length delimited. Does not implicitly {@link aggregator.CreateWalletReq.verify|verify} messages. + * @param message CreateWalletReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICreateWalletReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWalletReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWalletReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateWalletReq; + + /** + * Decodes a CreateWalletReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWalletReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateWalletReq; + + /** + * Verifies a CreateWalletReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWalletReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWalletReq + */ + public static fromObject(object: { [k: string]: any }): aggregator.CreateWalletReq; + + /** + * Creates a plain object from a CreateWalletReq message. Also converts values to other types if specified. + * @param message CreateWalletReq + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CreateWalletReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWalletReq to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWalletReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateWalletResp. */ + interface ICreateWalletResp { + + /** CreateWalletResp address */ + address?: (string|null); + } + + /** Represents a CreateWalletResp. */ + class CreateWalletResp implements ICreateWalletResp { + + /** + * Constructs a new CreateWalletResp. + * @param [properties] Properties to set + */ + constructor(properties?: aggregator.ICreateWalletResp); + + /** CreateWalletResp address. */ + public address: string; + + /** + * Creates a new CreateWalletResp instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWalletResp instance + */ + public static create(properties?: aggregator.ICreateWalletResp): aggregator.CreateWalletResp; + + /** + * Encodes the specified CreateWalletResp message. Does not implicitly {@link aggregator.CreateWalletResp.verify|verify} messages. + * @param message CreateWalletResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: aggregator.ICreateWalletResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWalletResp message, length delimited. Does not implicitly {@link aggregator.CreateWalletResp.verify|verify} messages. + * @param message CreateWalletResp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: aggregator.ICreateWalletResp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWalletResp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWalletResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateWalletResp; + + /** + * Decodes a CreateWalletResp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWalletResp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateWalletResp; + + /** + * Verifies a CreateWalletResp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWalletResp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWalletResp + */ + public static fromObject(object: { [k: string]: any }): aggregator.CreateWalletResp; + + /** + * Creates a plain object from a CreateWalletResp message. Also converts values to other types if specified. + * @param message CreateWalletResp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: aggregator.CreateWalletResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWalletResp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWalletResp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an Aggregator */ + class Aggregator extends $protobuf.rpc.Service { + + /** + * Constructs a new Aggregator service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Aggregator service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Aggregator; + + /** + * Calls GetKey. + * @param request GetKeyReq message or plain object + * @param callback Node-style callback called with the error, if any, and KeyResp + */ + public getKey(request: aggregator.IGetKeyReq, callback: aggregator.Aggregator.GetKeyCallback): void; + + /** + * Calls GetKey. + * @param request GetKeyReq message or plain object + * @returns Promise + */ + public getKey(request: aggregator.IGetKeyReq): Promise; + + /** + * Calls GetNonce. + * @param request NonceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and NonceResp + */ + public getNonce(request: aggregator.INonceRequest, callback: aggregator.Aggregator.GetNonceCallback): void; + + /** + * Calls GetNonce. + * @param request NonceRequest message or plain object + * @returns Promise + */ + public getNonce(request: aggregator.INonceRequest): Promise; + + /** + * Calls GetSmartAccountAddress. + * @param request AddressRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AddressResp + */ + public getSmartAccountAddress(request: aggregator.IAddressRequest, callback: aggregator.Aggregator.GetSmartAccountAddressCallback): void; + + /** + * Calls GetSmartAccountAddress. + * @param request AddressRequest message or plain object + * @returns Promise + */ + public getSmartAccountAddress(request: aggregator.IAddressRequest): Promise; + + /** + * Calls CreateWallet. + * @param request CreateWalletReq message or plain object + * @param callback Node-style callback called with the error, if any, and CreateWalletResp + */ + public createWallet(request: aggregator.ICreateWalletReq, callback: aggregator.Aggregator.CreateWalletCallback): void; + + /** + * Calls CreateWallet. + * @param request CreateWalletReq message or plain object + * @returns Promise + */ + public createWallet(request: aggregator.ICreateWalletReq): Promise; + + /** + * Calls CreateTask. + * @param request CreateTaskReq message or plain object + * @param callback Node-style callback called with the error, if any, and CreateTaskResp + */ + public createTask(request: aggregator.ICreateTaskReq, callback: aggregator.Aggregator.CreateTaskCallback): void; + + /** + * Calls CreateTask. + * @param request CreateTaskReq message or plain object + * @returns Promise + */ + public createTask(request: aggregator.ICreateTaskReq): Promise; + + /** + * Calls ListTasks. + * @param request ListTasksReq message or plain object + * @param callback Node-style callback called with the error, if any, and ListTasksResp + */ + public listTasks(request: aggregator.IListTasksReq, callback: aggregator.Aggregator.ListTasksCallback): void; + + /** + * Calls ListTasks. + * @param request ListTasksReq message or plain object + * @returns Promise + */ + public listTasks(request: aggregator.IListTasksReq): Promise; + + /** + * Calls GetTask. + * @param request UUID message or plain object + * @param callback Node-style callback called with the error, if any, and Task + */ + public getTask(request: aggregator.IUUID, callback: aggregator.Aggregator.GetTaskCallback): void; + + /** + * Calls GetTask. + * @param request UUID message or plain object + * @returns Promise + */ + public getTask(request: aggregator.IUUID): Promise; + + /** + * Calls CancelTask. + * @param request UUID message or plain object + * @param callback Node-style callback called with the error, if any, and BoolValue + */ + public cancelTask(request: aggregator.IUUID, callback: aggregator.Aggregator.CancelTaskCallback): void; + + /** + * Calls CancelTask. + * @param request UUID message or plain object + * @returns Promise + */ + public cancelTask(request: aggregator.IUUID): Promise; + + /** + * Calls DeleteTask. + * @param request UUID message or plain object + * @param callback Node-style callback called with the error, if any, and BoolValue + */ + public deleteTask(request: aggregator.IUUID, callback: aggregator.Aggregator.DeleteTaskCallback): void; + + /** + * Calls DeleteTask. + * @param request UUID message or plain object + * @returns Promise + */ + public deleteTask(request: aggregator.IUUID): Promise; + + /** + * Calls Ping. + * @param request Checkin message or plain object + * @param callback Node-style callback called with the error, if any, and CheckinResp + */ + public ping(request: aggregator.ICheckin, callback: aggregator.Aggregator.PingCallback): void; + + /** + * Calls Ping. + * @param request Checkin message or plain object + * @returns Promise + */ + public ping(request: aggregator.ICheckin): Promise; + + /** + * Calls SyncTasks. + * @param request SyncTasksReq message or plain object + * @param callback Node-style callback called with the error, if any, and SyncTasksResp + */ + public syncTasks(request: aggregator.ISyncTasksReq, callback: aggregator.Aggregator.SyncTasksCallback): void; + + /** + * Calls SyncTasks. + * @param request SyncTasksReq message or plain object + * @returns Promise + */ + public syncTasks(request: aggregator.ISyncTasksReq): Promise; + + /** + * Calls UpdateChecks. + * @param request UpdateChecksReq message or plain object + * @param callback Node-style callback called with the error, if any, and UpdateChecksResp + */ + public updateChecks(request: aggregator.IUpdateChecksReq, callback: aggregator.Aggregator.UpdateChecksCallback): void; + + /** + * Calls UpdateChecks. + * @param request UpdateChecksReq message or plain object + * @returns Promise + */ + public updateChecks(request: aggregator.IUpdateChecksReq): Promise; + } + + namespace Aggregator { + + /** + * Callback as used by {@link aggregator.Aggregator#getKey}. + * @param error Error, if any + * @param [response] KeyResp + */ + type GetKeyCallback = (error: (Error|null), response?: aggregator.KeyResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#getNonce}. + * @param error Error, if any + * @param [response] NonceResp + */ + type GetNonceCallback = (error: (Error|null), response?: aggregator.NonceResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#getSmartAccountAddress}. + * @param error Error, if any + * @param [response] AddressResp + */ + type GetSmartAccountAddressCallback = (error: (Error|null), response?: aggregator.AddressResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#createWallet}. + * @param error Error, if any + * @param [response] CreateWalletResp + */ + type CreateWalletCallback = (error: (Error|null), response?: aggregator.CreateWalletResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#createTask}. + * @param error Error, if any + * @param [response] CreateTaskResp + */ + type CreateTaskCallback = (error: (Error|null), response?: aggregator.CreateTaskResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#listTasks}. + * @param error Error, if any + * @param [response] ListTasksResp + */ + type ListTasksCallback = (error: (Error|null), response?: aggregator.ListTasksResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#getTask}. + * @param error Error, if any + * @param [response] Task + */ + type GetTaskCallback = (error: (Error|null), response?: aggregator.Task) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#cancelTask}. + * @param error Error, if any + * @param [response] BoolValue + */ + type CancelTaskCallback = (error: (Error|null), response?: google.protobuf.BoolValue) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#deleteTask}. + * @param error Error, if any + * @param [response] BoolValue + */ + type DeleteTaskCallback = (error: (Error|null), response?: google.protobuf.BoolValue) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#ping}. + * @param error Error, if any + * @param [response] CheckinResp + */ + type PingCallback = (error: (Error|null), response?: aggregator.CheckinResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#syncTasks}. + * @param error Error, if any + * @param [response] SyncTasksResp + */ + type SyncTasksCallback = (error: (Error|null), response?: aggregator.SyncTasksResp) => void; + + /** + * Callback as used by {@link aggregator.Aggregator#updateChecks}. + * @param error Error, if any + * @param [response] UpdateChecksResp + */ + type UpdateChecksCallback = (error: (Error|null), response?: aggregator.UpdateChecksResp) => void; + } +} + +/** Namespace google. */ +export namespace google { + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: Uint8Array; + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/src/builder.ts b/src/builder.ts new file mode 100644 index 0000000..0ee8320 --- /dev/null +++ b/src/builder.ts @@ -0,0 +1,34 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; + +export const buildContractWrite = ({contractAddress, callData, contractABI}): avs_pb.ContractWriteNode => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (contractABI) { + // not everytine the Abi is available on Etherscan + n.setContractAbi(contractABI); + } + + return n; +} + +export const buildContractRead = ({contract_ddress, callData, contractABI}): avs_pb.ContractReadNode => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + // not everytine the Abi is available on Etherscan + n.setContractAbi(n.contractABI); + } + + return n; +} + +export const buildTaskEdge = ({id, source, target}): avs_pb.TaskEdge => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + + return edge; +} diff --git a/src/index.ts b/src/index.ts index c2cf05c..19052b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -23,14 +23,15 @@ import { ListTasksResponse, } from "./types"; +import { + buildContractWrite, buildTaskEdge +} from "./builder"; + class BaseClient { readonly endpoint: string; readonly rpcClient; protected metadata: Metadata; - protected authKey?: string; - // owner is the EOA user wallet. It's the underlying user who created smart wallets and create tasks - protected owner?: string; constructor(opts: ClientOption) { this.endpoint = opts.endpoint; @@ -76,10 +77,6 @@ class BaseClient { avs_pb.GetKeyReq >("getKey", request); - this.authKey = result.getKey(); - // when using an API key, the key can authenticate on behalf of other users as long as the user granted the permission - this.owner = address; - return { authKey: result.getKey() }; } @@ -101,10 +98,6 @@ class BaseClient { request ); - // succesfully authenticated, initialized trusted information for subsequent api call on this client - this.authKey = result.getKey(); - this.owner = address; - return { authKey: result.getKey() }; } @@ -116,14 +109,14 @@ class BaseClient { // Clone the existing metadata from the client const metadata = _.cloneDeep(this.metadata); - if (!this.authKey) { + if (!options?.authKey) { throw new Error("Not authenticated yet"); } - metadata.set(AUTH_KEY_HEADER, this.authKey); + metadata.set(AUTH_KEY_HEADER, options.authKey); return new Promise((resolve, reject) => { (this.rpcClient as any)[method].bind(this.rpcClient)( - request, + request as any, metadata, (error: any, response: TResponse) => { if (error) reject(error); @@ -138,10 +131,13 @@ class BaseClient { request: TRequest | any, options?: RequestOptions ): Promise { + // Clone the existing metadata from the client + const metadata = _.cloneDeep(this.metadata); + return new Promise((resolve, reject) => { (this.rpcClient as any)[method].bind(this.rpcClient)( request, - this.metadata, + metadata, (error: any, response: TResponse) => { if (error) reject(error); else resolve(response); @@ -157,13 +153,14 @@ export default class Client extends BaseClient { } async listSmartWallets( + options: RequestOptions, ): Promise { - const request = new avs_pb.AddressRequest(); + const request = new avs_pb.ListWalletReq(); const result = await this._callRPC< avs_pb.AddressResp, - avs_pb.AddressRequest - >("getSmartAccountAddress", request); + avs_pb.ListWalletReq + >("listWallets", request, options); return { wallets: result.getWalletsList().map(item => item.toObject()), @@ -171,7 +168,11 @@ export default class Client extends BaseClient { } async createWallet( - salt: string, factoryAddress?: string + { + salt, + factoryAddress + }: CreateWalletReq, + options: RequestOptions, ): Promise { const request = new avs_pb.CreateWalletReq(); request.setSalt(salt); @@ -182,138 +183,114 @@ export default class Client extends BaseClient { const result = await this._callRPC< avs_pb.CreateWalletReq, avs_pb.CreateWalletResp - >("createWallet", request); + >("createWallet", request, options); - return { - address: result.getAddress(), - }; + return result.toObject(); } - async createTask( - { - address, - oracleContract, - tokenContract, - }: { - address: string; - tokenContract: string; - oracleContract: string; + async createTask(payload: any, options: RequestOptions): Promise { + const request = new avs_pb.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt); + request.setMemo(payload.memo); + + // request.setTrigger(payload.trigger); + let nodes = []; + for (const node of payload.nodes) { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + + if (node.ethTransfer) { + // n.setEthTransfer(node.ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + // } else if (node.graphqlDataQuery) { + // n.setGraphqlDataQuery(node.graphqlDataQuery); + // } else if (node.restApi) { + // n.setRestApi(node.restApi); + //} else if (node.branch) { + // n.setBranch(node.branch); + //} else if (node["filter"]) { + // n.setfilter(node["filter"]); + //} else if (node.customCode) { + // n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + nodes.push(n); + request.addNodes(n); } - ): Promise { - const trigger = new avs_pb.TaskTrigger(); - trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); - trigger.setExpression( - new avs_pb.ExpressionCondition().setExpression(` - bigCmp( - priceChainlink("${oracleContract}"), - toBigInt("10000") - ) > 0`) - ); - const action = new avs_pb.TaskAction(); - action.setTaskType(avs_pb.TaskType.CONTRACTEXECUTIONTASK); - action.setId("transfer_erc20_1"); - action.setName("Transfer Test Token"); - const execution = new avs_pb.ContractExecution(); - execution.setContractAddress(tokenContract); - - let ABI = ["function transfer(address to, uint amount)"]; - let iface = new ethers.Interface(ABI); - const callData = iface.encodeFunctionData("transfer", [ - address, - ethers.parseUnits("12", 18), - ]); - execution.setCallData(callData); - - action.setContractExecution(execution); - - const request = new avs_pb.CreateTaskReq() - .setTrigger(trigger) - .setActionsList([action]) - .setExpiredAt(Math.floor(Date.now() / 1000) + 1000000); + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + //const request = aggPb.CreateTaskReq.create(payload); const result = await this._callRPC< - avs_pb.CreateTaskResp, - avs_pb.CreateTaskReq - >("createTask", request, { authKey }); + avs_pb.CreateTaskResp + >("createTask", request, options); return { id: result.getId(), }; } - async listTasks( - address: string - ): Promise { + async listTasks(address: string, options: RequestOptions): Promise { const request = new avs_pb.ListTasksReq(); + request.setSmartWalletAddress(address); const result = await this._callRPC< avs_pb.ListTasksResp, avs_pb.ListTasksReq - >("listTasks", request, { authKey }); - - const tasks = _.map( - result.getTasksList(), - (obj: avs_pb.ListTasksResp.TaskItemResp) => { - return { - id: obj.getId(), - status: _.capitalize(obj.getStatus().toString()), - }; - } - ); + >("listTasks", request, options); - return { - tasks: tasks, - }; + return result.getTasksList().map(item => new Task(item)); } // TODO: specify the return type to match client’s requirements - // Right now we simply return the original object from the server - async getTask( - id: string, - ): Promise { - const request = new avs_pb.UUID(); - request.setBytes(id); - ``; - - const result = await this._callRPC( + async getTask(id: string, options: RequestOptions): Promise { + const request = new avs_pb.IdReq(); + request.setId(id); + + const result = await this._callRPC( "getTask", request, + options ); return new Task(result); } - async cancelTask( - id: string - ): Promise { - const request = new avs_pb.UUID(); - request.setBytes(id); + async cancelTask(id: string, options: RequestOptions): Promise { + const request = new avs_pb.IdReq(); + request.setId(id); - const result = await this._callRPC( + const result = await this._callRPC( "cancelTask", request, + options ); - return { - value: result.getValue(), - }; + return result.getValue(); } - async deleteTask( - id: string - ): Promise { - const request = new avs_pb.UUID(); - request.setBytes(id); + async deleteTask(id: string, options: RequestOptions): Promise { + const request = new avs_pb.IdReq(); + request.setId(id); - const result = await this._callRPC( + const result = await this._callRPC( "deleteTask", request, + options ); - return { - value: result.getValue(), - }; + return result.getValue(); } } diff --git a/src/task.ts b/src/task.ts index a8c1e77..7063023 100644 --- a/src/task.ts +++ b/src/task.ts @@ -1,6 +1,14 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { TaskType } from "./types"; +function buildNodeFromGRPC(node) { + return node.toObject(); +} + +function buildTriggerFromGRPC(trigger) { + return trigger?.toObject(); +} + class Task implements TaskType { id: string; status: number; @@ -25,22 +33,15 @@ class Task implements TaskType { this.id = task.getId()?.toString() || ""; this.status = task.getStatus().toString(); this.owner = task.getOwner(); - this.smartAccountAddress = task.getSmartAccountAddress(); - this.trigger = { - triggerType: task.getTrigger()?.getTriggerType() || 0, - schedule: task.getTrigger()?.getSchedule()?.toObject(), - contractQuery: task.getTrigger()?.getContractQuery()?.toObject(), - expression: task.getTrigger()?.getExpression()?.toObject() || { - expression: "", - }, - }; - this.nodesList = task.getNodesList(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.trigger = buildTriggerFromGRPC(task.getTrigger()); + this.nodes = task.getNodesList().map(node => buildNodeFromGRPC(node)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.repeatable = task.getRepeatable(); + //this.repeatable = task.getRepeatable(); this.executionsList = task.getExecutionsList(); } } diff --git a/src/types.ts b/src/types.ts index d54cf9a..a3d0507 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,7 +3,7 @@ import _ from "lodash"; // Define the environment type export type Environment = "production" | "development" | "staging"; -export const AUTH_KEY_HEADER = "authKey"; +export const AUTH_KEY_HEADER = "authkey"; export interface RequestOptions { authKey: string; @@ -72,4 +72,9 @@ export interface DeleteTaskResponse { export interface GetAddressesResponse { owner: string; smart_account_address: string; +} + +export interface CreateWalletReq { + salt: string; + factoryAddress?: string; } \ No newline at end of file diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 1984a43..40c5f0c 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -1,8 +1,10 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; import Client from "../src/index"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { UlidMonotonic } from 'id128' // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -44,7 +46,6 @@ describe("Client E2E Tests", () => { expect(res).toBeDefined(); expect(res).toHaveProperty("authKey"); - expect(typeof res.authKey).toBe("string"); // Check if the key is a valid JWT token const keyParts = res.authKey.split("."); @@ -81,7 +82,6 @@ describe("Client E2E Tests", () => { expect(res).toBeDefined(); expect(res).toHaveProperty("authKey"); - expect(typeof res.authKey).toBe("string"); // Check if the key is a valid JWT token const keyParts = res.authKey.split("."); @@ -99,6 +99,38 @@ describe("Client E2E Tests", () => { let walletAddress: string; let client: Client; let createdTaskId: string; // Add this line to declare the variable + let authKey: string; + + let testTaskPayload = { + smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', + + startAt: Math.floor(Date.now() / 1000) + 30, + expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), + memo: `Test task`, + + trigger: { + trigger_type: avs_pb.TriggerType.BLOCKTRIGGER, + block: { + interval: 5, // run every 5 block + }, + }, + nodes: [{ + // id need to be unique. it will be assign to the variable + id: "uuid123", + // name is for our note only. use for display a humand friendly version + name: 'transfer token', + contractWrite: { + contractAddress: TOKEN_CONTRACT, + callData: "0x123cdef", + } + }], + + edges: [{ + id: UlidMonotonic.generate().toCanonical(), + source: "__TRIGGER__", + target: "uuid123", + }], + }; beforeAll(async () => { // Initialize the client with test credentials @@ -115,21 +147,19 @@ describe("Client E2E Tests", () => { ); } - let a = await client.authWithSignature(walletAddress, signature, EXPIRED_AT); + const result = await client.authWithSignature(walletAddress, signature, EXPIRED_AT); + authKey = result.authKey; }); test("createWallet", async () => { - const result = await client.createWallet("123"); + const result = await client.createWallet({salt: "123"}, { authKey }); expect(result?.address).toEqual("0x2Ca3B219f7A22185693D10051EeD9C29EC3e8f8e"); + expect(result?.salt).toEqual("123"); + expect(result?.factoryAddress).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); }); test("listSmartWallets", async () => { - const result = await client.listSmartWallets(walletAddress); - // Example result: - // { - // address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', - // smart_account_address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', - // } + const result = await client.listSmartWallets({ authKey }); expect(result).toBeDefined(); expect(result.wallets).toBeDefined(); expect(result.wallets.length).toBeGreaterThanOrEqual(1); @@ -140,44 +170,71 @@ describe("Client E2E Tests", () => { }); test("createTask", async () => { - const result = await client.createTask({ - address: walletAddress, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }); + const result = await client.createTask(testTaskPayload, { authKey }); expect(result).toBeDefined(); expect(result).toHaveProperty("id"); - - // Important: save the task ID to the suite for the following tests - createdTaskId = result.id; + expect(result.id).toHaveLength(26); }); test("getTask", async () => { - // Use the saved task ID - if (createdTaskId) { - const result = await client.getTask(createdTaskId); - expect(result).toBeDefined(); - } else { - console.warn("No task ID available to test getTask"); - } + const result = await client.createTask(testTaskPayload, { authKey }); + expect(result?.id).toHaveLength(26); + + const task = await client.getTask(result.id, { authKey }); + expect(task.status).toEqual(0); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(TOKEN_CONTRACT); + expect(task.nodes[0].contractWrite.callData).toEqual("0x123cdef"); + }); + + test("listTask", async () => { + // ensure the smart wallet is created + const smartWallet = await client.createWallet({salt: "345"}, { authKey }); + + // populate tasks for default wallet and the custom salt smart wallet above + const result1 = await client.createTask({...testTaskPayload, memo: 'task1 test', smartWalletAddress: smartWallet.address}, { authKey }); + const tasks1 = await client.listTasks(smartWallet.address, { authKey }); + + const result2 = await client.createTask({...testTaskPayload, memo: 'default wallet test'}, { authKey }); + const tasks2 = await client.listTasks("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41", { authKey }); + + expect(tasks1.length).toBeGreaterThanOrEqual(1); + expect(tasks2.length).toBeGreaterThanOrEqual(1); + + const task1 = tasks1.find(t => t.id == result1.id); + expect(task1?.id).toEqual(result1.id); + expect(task1?.memo).toEqual('task1 test'); + + const task2 = tasks2.find(t => t.id == result2.id); + expect(task2?.id).toEqual(result2.id); + expect(task2?.memo).toEqual('default wallet test'); }); test("cancelTask", async () => { - if (createdTaskId) { - const result = await client.cancelTask(createdTaskId); - expect(result).toBe(true); - } else { - console.warn("No task ID available to test cancelTask"); - } + const result = await client.createTask(testTaskPayload, { authKey }); + const task = await client.getTask(result.id, { authKey }); + expect(task.status).toEqual(0); + + const cancelResult = await client.cancelTask(task.id, { authKey }); + expect(cancelResult).toEqual(true); + const updatedTask = await client.getTask(task.id, { authKey }); + expect(updatedTask.status).toEqual(3); }); test("deleteTask", async () => { - if (createdTaskId) { - const result = await client.deleteTask(createdTaskId); - expect(result).toBe(true); - } else { - console.warn("No task ID available to test deleteTask"); + const result = await client.createTask(testTaskPayload, { authKey }); + const task = await client.getTask(result.id, { authKey }); + expect(task.status).toEqual(0); + expect(task.id).toHaveLength(26); + + const deleteResult = await client.deleteTask(task.id, { authKey }); + expect(deleteResult).toEqual(true); + try { + await client.getTask(task.id, { authKey }); + } catch (e) { + expect(e.code).toEqual(5); + expect(e.message).toEqual('5 NOT_FOUND: task not found'); } }); }); From 361e2b20d5962c293a772fe1310f5d6bfad7a985 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 11:06:24 -0800 Subject: [PATCH 05/51] add 2 ore attestion --- tests/basic.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 40c5f0c..7faae33 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -203,10 +203,12 @@ describe("Client E2E Tests", () => { expect(tasks2.length).toBeGreaterThanOrEqual(1); const task1 = tasks1.find(t => t.id == result1.id); + expect(tasks1.find(t => t.id == result2.id)).toBe(undefined); expect(task1?.id).toEqual(result1.id); expect(task1?.memo).toEqual('task1 test'); const task2 = tasks2.find(t => t.id == result2.id); + expect(tasks2.find(t => t.id == result1.id)).toBe(undefined); expect(task2?.id).toEqual(result2.id); expect(task2?.memo).toEqual('default wallet test'); }); From c2d35301b88f02361902ccbb121bba375056c242 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 11:49:39 -0800 Subject: [PATCH 06/51] remvoe magic const --- tests/basic.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 7faae33..16ae6a4 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -182,7 +182,7 @@ describe("Client E2E Tests", () => { expect(result?.id).toHaveLength(26); const task = await client.getTask(result.id, { authKey }); - expect(task.status).toEqual(0); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(TOKEN_CONTRACT); expect(task.nodes[0].contractWrite.callData).toEqual("0x123cdef"); @@ -216,18 +216,18 @@ describe("Client E2E Tests", () => { test("cancelTask", async () => { const result = await client.createTask(testTaskPayload, { authKey }); const task = await client.getTask(result.id, { authKey }); - expect(task.status).toEqual(0); + expect(task.status).toEqual( avs_pb.TaskStatus.ACTIVE); const cancelResult = await client.cancelTask(task.id, { authKey }); expect(cancelResult).toEqual(true); const updatedTask = await client.getTask(task.id, { authKey }); - expect(updatedTask.status).toEqual(3); + expect(updatedTask.status).toEqual( avs_pb.TaskStatus.CANCELED); }); test("deleteTask", async () => { const result = await client.createTask(testTaskPayload, { authKey }); const task = await client.getTask(result.id, { authKey }); - expect(task.status).toEqual(0); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.id).toHaveLength(26); const deleteResult = await client.deleteTask(task.id, { authKey }); From 24c2028eaac418958e8c6fa96149f0c7abf46562 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 16:31:25 -0800 Subject: [PATCH 07/51] more fixed test --- src/index.ts | 6 +-- tests/basic.test.ts | 62 ++++++++---------------------- tests/cancelTask.test.ts | 78 +++++++++++++++---------------------- tests/createTask.test.ts | 83 +++++++++++----------------------------- tests/deleteTask.test.ts | 75 +++++++++++++++--------------------- tests/fixture.ts | 33 ++++++++++++++++ 6 files changed, 133 insertions(+), 204 deletions(-) create mode 100644 tests/fixture.ts diff --git a/src/index.ts b/src/index.ts index 19052b8..dd8483c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,7 +110,7 @@ class BaseClient { const metadata = _.cloneDeep(this.metadata); if (!options?.authKey) { - throw new Error("Not authenticated yet"); + throw new Error("missing auth header"); } metadata.set(AUTH_KEY_HEADER, options.authKey); @@ -162,9 +162,7 @@ export default class Client extends BaseClient { avs_pb.ListWalletReq >("listWallets", request, options); - return { - wallets: result.getWalletsList().map(item => item.toObject()), - }; + return result.getWalletsList().map(item => item.toObject()); } async createWallet( diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 16ae6a4..2f51c73 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -4,10 +4,11 @@ import Client from "../src/index"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { UlidMonotonic } from 'id128' +import { sampleTask1 } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); + // Get environment variables with type safety const { TEST_API_KEY, @@ -101,37 +102,6 @@ describe("Client E2E Tests", () => { let createdTaskId: string; // Add this line to declare the variable let authKey: string; - let testTaskPayload = { - smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', - - startAt: Math.floor(Date.now() / 1000) + 30, - expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), - memo: `Test task`, - - trigger: { - trigger_type: avs_pb.TriggerType.BLOCKTRIGGER, - block: { - interval: 5, // run every 5 block - }, - }, - nodes: [{ - // id need to be unique. it will be assign to the variable - id: "uuid123", - // name is for our note only. use for display a humand friendly version - name: 'transfer token', - contractWrite: { - contractAddress: TOKEN_CONTRACT, - callData: "0x123cdef", - } - }], - - edges: [{ - id: UlidMonotonic.generate().toCanonical(), - source: "__TRIGGER__", - target: "uuid123", - }], - }; - beforeAll(async () => { // Initialize the client with test credentials client = new Client({ @@ -159,18 +129,16 @@ describe("Client E2E Tests", () => { }); test("listSmartWallets", async () => { - const result = await client.listSmartWallets({ authKey }); - expect(result).toBeDefined(); - expect(result.wallets).toBeDefined(); - expect(result.wallets.length).toBeGreaterThanOrEqual(1); + const wallets = await client.listSmartWallets({ authKey }); + expect(wallets.length).toBeGreaterThanOrEqual(1); - expect(result.wallets[0].address).toEqual("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41"); - expect(result.wallets[0].salt).toEqual("0"); - expect(result.wallets[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + expect(wallets[0].address).toEqual("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41"); + expect(wallets[0].salt).toEqual("0"); + expect(wallets[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); }); test("createTask", async () => { - const result = await client.createTask(testTaskPayload, { authKey }); + const result = await client.createTask(sampleTask1, { authKey }); expect(result).toBeDefined(); expect(result).toHaveProperty("id"); @@ -178,14 +146,14 @@ describe("Client E2E Tests", () => { }); test("getTask", async () => { - const result = await client.createTask(testTaskPayload, { authKey }); + const result = await client.createTask(sampleTask1, { authKey }); expect(result?.id).toHaveLength(26); const task = await client.getTask(result.id, { authKey }); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(TOKEN_CONTRACT); - expect(task.nodes[0].contractWrite.callData).toEqual("0x123cdef"); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); }); test("listTask", async () => { @@ -193,10 +161,10 @@ describe("Client E2E Tests", () => { const smartWallet = await client.createWallet({salt: "345"}, { authKey }); // populate tasks for default wallet and the custom salt smart wallet above - const result1 = await client.createTask({...testTaskPayload, memo: 'task1 test', smartWalletAddress: smartWallet.address}, { authKey }); + const result1 = await client.createTask({...sampleTask1, memo: 'task1 test', smartWalletAddress: smartWallet.address}, { authKey }); const tasks1 = await client.listTasks(smartWallet.address, { authKey }); - const result2 = await client.createTask({...testTaskPayload, memo: 'default wallet test'}, { authKey }); + const result2 = await client.createTask({...sampleTask1, memo: 'default wallet test'}, { authKey }); const tasks2 = await client.listTasks("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41", { authKey }); expect(tasks1.length).toBeGreaterThanOrEqual(1); @@ -214,7 +182,7 @@ describe("Client E2E Tests", () => { }); test("cancelTask", async () => { - const result = await client.createTask(testTaskPayload, { authKey }); + const result = await client.createTask(sampleTask1, { authKey }); const task = await client.getTask(result.id, { authKey }); expect(task.status).toEqual( avs_pb.TaskStatus.ACTIVE); @@ -225,7 +193,7 @@ describe("Client E2E Tests", () => { }); test("deleteTask", async () => { - const result = await client.createTask(testTaskPayload, { authKey }); + const result = await client.createTask(sampleTask1, { authKey }); const task = await client.getTask(result.id, { authKey }); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.id).toHaveLength(26); diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 41bcaed..6139584 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -1,9 +1,12 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { sampleTask1 } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -41,7 +44,7 @@ describe("cancelTask Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,19 +58,13 @@ describe("cancelTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -76,46 +73,38 @@ describe("cancelTask Tests", () => { test("should cancel task when authenticated with signature", async () => { const result = await client.cancelTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( - true - ); + const cancelTask = await client.getTask(createdTaskId, { authKey }); + expect(cancelTask.id).toEqual(createdTaskId); + expect(cancelTask.status).toEqual(avs_pb.TaskStatus.CANCELED); }); test("should throw error when canceling an non-existent task", async () => { // This fails because the current error message is "2 UNKNOWN: Key not found", which is not a clear error message await expect(client.cancelTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const wallets = await client.listSmartWallets({ authKey }); + smartWalletAddress = wallets[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -124,23 +113,21 @@ describe("cancelTask Tests", () => { test("should cancel task when authenticated with API key", async () => { const result = await client.cancelTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( - true - ); + const cancelTask = await client.getTask(createdTaskId, { authKey }); + expect(cancelTask.id).toEqual(createdTaskId); + expect(cancelTask.status).toEqual(avs_pb.TaskStatus.CANCELED); }); test("should throw error when canceling an non-existent task", async () => { await expect(client.cancelTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; let createdTaskId: string; @@ -155,18 +142,15 @@ describe("cancelTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const wallets = await client.listSmartWallets({ authKey }); + smartWalletAddress = wallets[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, + ...sampleTask1, + smartWalletAddress }, { authKey } ); diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index ee03367..5f24320 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -1,9 +1,11 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { sampleTask1 } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -39,7 +41,7 @@ describe("createTask Tests", () => { }); describe("Auth with Signature", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; beforeAll(async () => { @@ -53,18 +55,14 @@ describe("createTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const result = await client.getAddresses(ownerAddress, { authKey }); - smartWallet = result.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); }); test("should create a task when authenticated with signature", async () => { const result = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); console.log("Create task result:", result); @@ -74,38 +72,30 @@ describe("createTask Tests", () => { test("should throw error when creating a task with owner address using signature", async () => { await expect(client.createTask( - { - address: ownerAddress, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress: ownerAddress }, { authKey } - )).rejects.toThrow("invalid address"); + )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress,TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const result = await client.getAddresses(ownerAddress, { authKey }); - smartWallet = result.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); }); test("should create a task when authenticated with API key", async () => { const result = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); console.log("Create task result:", result); @@ -115,49 +105,20 @@ describe("createTask Tests", () => { test("should throw error when creating a task with owner address using API key", async () => { await expect(client.createTask( - { - address: ownerAddress, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, - { authKey } - ) - ).rejects.toThrow("invalid address"); + { ...sampleTask1, smartWalletAddress: ownerAddress }, + { authKey } + )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account addres"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; - beforeAll(async () => { - console.log("Authenticating with signature ..."); - const signature = await generateSignature(TEST_PRIVATE_KEY, EXPIRED_AT); - const res = await client.authWithSignature( - ownerAddress, - signature, - EXPIRED_AT - ); - authKey = res.authKey; - - console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); - }); - test("should throw error when creating a task without authentication", async () => { await expect(client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, - { authKey: "" } - ) - ).rejects.toThrow("missing auth header"); + { ...sampleTask1, smartWalletAddress } + )).rejects.toThrow("missing auth header"); }); }); }); diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index ab2c995..5c7bbdc 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -1,9 +1,11 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { sampleTask1 } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -41,7 +43,7 @@ describe("deleteTask Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,19 +57,13 @@ describe("deleteTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -76,11 +72,11 @@ describe("deleteTask Tests", () => { test("should delete task when authenticated with signature", async () => { const result = await client.deleteTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( + const listRes = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(listRes)).toBe(true); + expect(listRes.some((task) => task.id === createdTaskId)).toBe( false ); }); @@ -88,59 +84,54 @@ describe("deleteTask Tests", () => { test("should throw error when deleting an non-existent task", async () => { // This fails because the current error message is "2 UNKNOWN: Key not found", which is not a clear error message await expect(client.deleteTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const getAddressesRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = getAddressesRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); createdTaskId = createTaskRes.id; + console.log("crate task", createdTaskId); }); test("should delete task when authenticated with API key", async () => { const result = await client.deleteTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( + const listRes = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(listRes)).toBe(true); + expect(listRes.some((task) => task.id === createdTaskId)).toBe( false ); }); test("should throw error when deleting an non-existent task", async () => { await expect(client.deleteTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; let createdTaskId: string; @@ -155,19 +146,13 @@ describe("deleteTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const getAddressesRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = getAddressesRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); diff --git a/tests/fixture.ts b/tests/fixture.ts new file mode 100644 index 0000000..0b8c16b --- /dev/null +++ b/tests/fixture.ts @@ -0,0 +1,33 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; +import { UlidMonotonic } from "id128"; +import { requireEnvVar } from "./utils"; + +export const sampleTask1 = { + smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', + startAt: Math.floor(Date.now() / 1000) + 30, + expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), + memo: `Test task`, + + trigger: { + trigger_type: avs_pb.TriggerType.BLOCKTRIGGER, + block: { + interval: 5, // run every 5 block + }, + }, + nodes: [{ + // id need to be unique. it will be assign to the variable + id: "uuid123", + // name is for our note only. use for display a humand friendly version + name: 'transfer token', + contractWrite: { + contractAddress: "0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b", + callData: "0x123cdef", + } + }], + edges: [{ + id: UlidMonotonic.generate().toCanonical(), + source: "__TRIGGER__", + target: "uuid123", + }], +}; + From 8424188730dc1a6964d25b63e4656b993a8391ca Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 16:33:21 -0800 Subject: [PATCH 08/51] add ulid --- package-lock.json | 14 +++++++++++--- package.json | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c1e9b3f..a659814 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@avaprotocol/sdk-js", - "version": "0.6.13", + "version": "0.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@avaprotocol/sdk-js", - "version": "0.6.13", + "version": "0.7.3", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.11.3", @@ -14,6 +14,7 @@ "dotenv": "^16.4.5", "ethers": "^6.13.2", "google-protobuf": "^3.21.4", + "id128": "^1.6.6", "lodash": "^4.17.21" }, "devDependencies": { @@ -5138,6 +5139,14 @@ "node": ">=0.10.0" } }, + "node_modules/id128": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/id128/-/id128-1.6.6.tgz", + "integrity": "sha512-ExSXL9qcyQ7X/AfyO4ouARLnztm7Nmry1rwGi1nbrtSM90tjjqKzeMKqJfkw5bDdDX7XqdXIRzYYkVj5PU28Hg==", + "engines": { + "node": ">=v6.9.0" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -6829,7 +6838,6 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", diff --git a/package.json b/package.json index b8248f0..e58b7e6 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "node": ">=20.18.0" }, "scripts": { - "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/main/protobuf/avs.proto > grpc_codegen/avs.proto", + "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/new-task-data-structure/protobuf/avs.proto > grpc_codegen/avs.proto", "gen-protoc": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc_codegen/ --grpc_out=grpc_js:./grpc_codegen/ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./grpc_codegen --proto_path=./grpc_codegen grpc_codegen/avs.proto", "build": "tsup src/index.ts --format cjs,esm --dts", "test": "jest --config jest.config.cjs", @@ -36,6 +36,7 @@ "dotenv": "^16.4.5", "ethers": "^6.13.2", "google-protobuf": "^3.21.4", + "id128": "^1.6.6", "lodash": "^4.17.21" }, "devDependencies": { From 52c6226eaf87fed3378a9df86c88afb3eb9e8cd8 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 16:46:26 -0800 Subject: [PATCH 09/51] fix get addresses test --- tests/getAddresses.test.ts | 49 ++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/tests/getAddresses.test.ts b/tests/getAddresses.test.ts index 5c985e9..c0d79e7 100644 --- a/tests/getAddresses.test.ts +++ b/tests/getAddresses.test.ts @@ -1,9 +1,8 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; - // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -25,7 +24,7 @@ const { // Define EXPIRED_AT as a constant const EXPIRED_AT = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // 24 hours from now -describe("getAddresses Tests", () => { +describe("listSmartWalletses Tests", () => { let ownerAddress: string; let client: Client; @@ -54,16 +53,21 @@ describe("getAddresses Tests", () => { authKey = res.authKey; }); - test("should get addresses when authenticated with signature", async () => { - const result = await client.getAddresses(ownerAddress, { authKey }); - expect(result.smart_account_address).toBeDefined(); - smartWallet = result.smart_account_address; - console.log("Smart wallet address:", smartWallet); + test("should include default smart wallet when authenticated with signature", async () => { + const result = await client.listSmartWallets({ authKey }); + expect(result).toBeDefined(); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result[0].salt).toEqual("0"); + expect(result[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + expect(result[0].address).toHaveLength(42); }); - test("should return empty when getting address with smartWallet using signature", async () => { - const result = await client.getAddresses(smartWallet, { authKey }); - expect(result.smart_account_address).toBe(undefined); + test("should include custom salt wallet when getting address with smartWallet using signature", async () => { + await client.createWallet({salt: "12345"}, { authKey }); + + const wallets = await client.listSmartWallets({ authKey }); + expect(wallets.length).toBeGreaterThanOrEqual(2); + expect(wallets.some(item => item.salt === "12345")).toBe(true); }); }); @@ -73,25 +77,30 @@ describe("getAddresses Tests", () => { beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; }); - test("should get addresses when authenticated with API key", async () => { - const result = await client.getAddresses(ownerAddress, { authKey }); - expect(result.smart_account_address).toBeDefined(); - smartWallet = result.smart_account_address; + test("should include default smart wallet when authenticated with API key", async () => { + const result = await client.listSmartWallets({ authKey }); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result[0].salt).toEqual("0"); + expect(result[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + expect(result[0].address).toHaveLength(42); }); - test("should return empty when getting address with smartWallet using API key", async () => { - const result = await client.getAddresses(smartWallet, { authKey }); - expect(result.smart_account_address).toBe(undefined); + test("should include custom salt wallet when getting address with API key", async () => { + await client.createWallet({salt: "78910"}, { authKey }); + + const wallets = await client.listSmartWallets({ authKey }); + expect(wallets.length).toBeGreaterThanOrEqual(2); + expect(wallets.some(item => item.salt === "78910")).toBe(true); }); }); test("should throw error when getting address without authentication", async () => { await expect( - client.getAddresses(ownerAddress, { authKey: "" }) + client.listSmartWallets({ authKey: "" }) ).rejects.toThrow("missing auth header"); }); }); From 463c28a263d4616b8d6bfe2e89545d26be7fc091 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 16:58:31 -0800 Subject: [PATCH 10/51] fix get Task --- tests/getTask.test.ts | 91 +++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 52 deletions(-) diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index acf18ec..183676d 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -1,9 +1,12 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { sampleTask1 } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -41,7 +44,7 @@ describe("getTask Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,18 +58,14 @@ describe("getTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, + ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -76,49 +75,41 @@ describe("getTask Tests", () => { test("should get task when authenticated with signature", async () => { const result = await client.getTask(createdTaskId, { authKey }); - console.log("first test", result); // Check if the result is an object and has the expected properties expect(result).toBeDefined(); - expect(result.status).toBe(0); + expect(result.status).toBe(avs_pb.TaskStatus.ACTIVE); expect(result.id).toBe(createdTaskId); - expect(result.smartAccountAddress).toBe(smartWallet); - expect(result.trigger).toBeDefined(); - expect(result.expiredAt).toBeDefined(); + expect(result.smartWalletAddress).toEqual(smartWalletAddress); + //expect(result.trigger).toBeDefined(); + expect(result.nodes).toHaveLength(1); + expect(result.expiredAt).toEqual(sampleTask1.expiredAt); + expect(result.memo).toEqual(sampleTask1.memo); }); - test("should return undefined when getting an non-existent task", async () => { - // This fails because the current error message is "2 UNKNOWN: Key not found", which is not a clear error message - const result = await client.getTask("non-existent-task-id", { authKey }); - - expect(result).toEqual(undefined); + test("should throw task not found when getting an non-existent task", async () => { + await expect(client.getTask("non-existent-task-id", { authKey })).rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -127,23 +118,25 @@ describe("getTask Tests", () => { test("should get task when authenticated with API key", async () => { const result = await client.getTask(createdTaskId, { authKey }); - expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( - false - ); + // Check if the result is an object and has the expected properties + expect(result).toBeDefined(); + expect(result.status).toBe(avs_pb.TaskStatus.ACTIVE); + expect(result.id).toBe(createdTaskId); + expect(result.smartWalletAddress).toEqual(smartWalletAddress); + //expect(result.trigger).toBeDefined(); + expect(result.nodes).toHaveLength(1); + expect(result.expiredAt).toEqual(sampleTask1.expiredAt); + expect(result.memo).toEqual(sampleTask1.memo); }); - test("should return undefined when getting an non-existent task", async () => { - const result = await client.getTask("non-existent-task-id", { authKey }); - expect(result).toEqual(undefined); + test("should throw task not found when getting an non-existent task", async () => { + await expect(client.getTask("non-existent-task-id", { authKey })).rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; let createdTaskId: string; @@ -158,19 +151,13 @@ describe("getTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); From 5a0929e6edf5e4805d7f6126de7c899af8fb94fa Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 17:10:21 -0800 Subject: [PATCH 11/51] fix list task --- tests/listTasks.test.ts | 88 ++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index b3e09b0..941ccd1 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -1,9 +1,11 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { sampleTask1 } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -41,7 +43,7 @@ describe("listTasks Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,19 +57,13 @@ describe("listTasks Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -75,42 +71,41 @@ describe("listTasks Tests", () => { }); test("should list tasks when authenticated with signature", async () => { - const result = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.some((task) => task.id === createdTaskId)).toBe(true); + const result = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(result)).toBe(true); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result.some((task) => task.id === createdTaskId)).toBe(true); }); - test("should return empty when listing owner address using signature", async () => { - const result = await client.listTasks(ownerAddress, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.length).toBe(0); + test("should throw error when not sending a valid smart wallet address", async () => { + await expect( + client.listTasks(ownerAddress, { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); + + await expect( + client.listTasks("0x000000000000000000000000000000000000dead", { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...sampleTask1, smartWalletAddress }, { authKey } ); @@ -118,20 +113,25 @@ describe("listTasks Tests", () => { }); test("should list tasks when authenticated with API key", async () => { - const result = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.some((task) => task.id === createdTaskId)).toBe(true); + const result = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(result)).toBe(true); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result.some((task) => task.id === createdTaskId)).toBe(true); }); - test("should return empty when listing owner address using API key", async () => { - const result = await client.listTasks(ownerAddress, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.length).toBe(0); + test("should throw error when not sending a valid smart wallet address using API key", async () => { + await expect( + client.listTasks(ownerAddress, { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); + + await expect( + client.listTasks("0x000000000000000000000000000000000000dead", { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; beforeAll(async () => { @@ -145,16 +145,14 @@ describe("listTasks Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); }); test("should throw error when listing tasks without authentication", async () => { await expect( - client.listTasks(smartWallet, { authKey: "" }) + client.listTasks(smartWalletAddress, { authKey: "" }) ).rejects.toThrow("missing auth header"); }); }); From 4e01b01880503cc5da16243890a2165ebaec605b Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 18:26:12 -0800 Subject: [PATCH 12/51] wait for aggregator --- .github/workflows/run-test-on-pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 237c453..347f3b4 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -41,4 +41,6 @@ jobs: docker compose up -d - name: Run tests - run: npm test \ No newline at end of file + run: | + sleep 10 + npm test \ No newline at end of file From 5ce463ebadf4b809eb9501ff18ecfb1e05a77127 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 19:15:37 -0800 Subject: [PATCH 13/51] wait server ready --- .github/workflows/run-test-on-pr.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 347f3b4..9020670 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -42,5 +42,9 @@ jobs: - name: Run tests run: | - sleep 10 + until curl --output /dev/null --silent --head --fail http://localhost:1323/telemetry; do + printf '.' + sleep 5 + done + npm test \ No newline at end of file From d9bcb71a5edc6ae6d5e81cf77868a4076bc83a51 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 19:17:06 -0800 Subject: [PATCH 14/51] run compose up early --- .github/workflows/run-test-on-pr.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 9020670..0e69b98 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -26,9 +26,6 @@ jobs: node-version: '18.x' cache: 'npm' - - name: Install dependencies - run: npm ci - - name: Debug environment variables run: | echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" @@ -39,7 +36,10 @@ jobs: - name: Bring up docker compose run: | docker compose up -d - + + - name: Install dependencies + run: npm ci + - name: Run tests run: | until curl --output /dev/null --silent --head --fail http://localhost:1323/telemetry; do From 415b3647fa03b63f5e2139bd83424157113d1276 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 19:17:37 -0800 Subject: [PATCH 15/51] run compose up very early --- .github/workflows/run-test-on-pr.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 0e69b98..8304022 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -19,12 +19,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18.x' - cache: 'npm' + + - name: Bring up docker compose + run: | + docker compose up -d - name: Debug environment variables run: | @@ -33,10 +31,12 @@ jobs: echo "ENDPOINT: $ENDPOINT" echo "TEST_PRIVATE_KEY is set: ${{ env.TEST_PRIVATE_KEY != '' }}" - - name: Bring up docker compose - run: | - docker compose up -d - + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'npm' + - name: Install dependencies run: npm ci From 179a8f7f0ea1e712300328bb7c3cf5bebc298ed7 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 19:20:50 -0800 Subject: [PATCH 16/51] no head --- .github/workflows/run-test-on-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 8304022..f0a5b38 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -42,7 +42,7 @@ jobs: - name: Run tests run: | - until curl --output /dev/null --silent --head --fail http://localhost:1323/telemetry; do + until curl --output /dev/null --silent --fail http://localhost:1323/telemetry; do printf '.' sleep 5 done From d5300aa9a9214a0febdfa8ffe711f430e12b4464 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 20:13:03 -0800 Subject: [PATCH 17/51] update test --- .github/workflows/run-test-on-pr.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index f0a5b38..f539d97 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -10,7 +10,9 @@ jobs: environment: test # The below environment variables are only available in the test environment env: - TEST_API_KEY: ${{ secrets.TEST_API_KEY }} + # Dummy api key + TEST_API_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBdmFQcm90b2NvbCIsInN1YiI6ImFwaWtleSIsImV4cCI6MjA0NzQzNTg2Niwicm9sZXMiOlsiYWRtaW4iXX0.C7-WZRLQDxLCG4RQ0NLyuncWTF0nqH5XwioUaIdJ-OQ" + # ${{ secrets.TEST_API_KEY }} TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} @@ -39,12 +41,14 @@ jobs: - name: Install dependencies run: npm ci - - - name: Run tests - run: | + + - name: ensure the aggregator is ready until curl --output /dev/null --silent --fail http://localhost:1323/telemetry; do printf '.' sleep 5 done - npm test \ No newline at end of file + - name: Run tests + run: | + #npm test + npx jest tests/deleteTask.test.ts \ No newline at end of file From 0d59d3aba82c08efb50b986a4bbc9b8c8193af4b Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 20:14:35 -0800 Subject: [PATCH 18/51] update github action --- .github/workflows/run-test-on-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index f539d97..25a2e9e 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -11,8 +11,8 @@ jobs: env: # Dummy api key - TEST_API_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBdmFQcm90b2NvbCIsInN1YiI6ImFwaWtleSIsImV4cCI6MjA0NzQzNTg2Niwicm9sZXMiOlsiYWRtaW4iXX0.C7-WZRLQDxLCG4RQ0NLyuncWTF0nqH5XwioUaIdJ-OQ" # ${{ secrets.TEST_API_KEY }} + TEST_API_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBdmFQcm90b2NvbCIsInN1YiI6ImFwaWtleSIsImV4cCI6MjA0NzQzNTg2Niwicm9sZXMiOlsiYWRtaW4iXX0.C7-WZRLQDxLCG4RQ0NLyuncWTF0nqH5XwioUaIdJ-OQ" TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} @@ -43,6 +43,7 @@ jobs: run: npm ci - name: ensure the aggregator is ready + run: | until curl --output /dev/null --silent --fail http://localhost:1323/telemetry; do printf '.' sleep 5 From 52ccbe103d0b931c38c202cd26ac85c7343c66b1 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 21:21:01 -0800 Subject: [PATCH 19/51] use 2 different provider for unittest --- config/aggregator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/aggregator.yaml b/config/aggregator.yaml index ea49452..0f25fd5 100644 --- a/config/aggregator.yaml +++ b/config/aggregator.yaml @@ -24,7 +24,7 @@ jwt_secret: "1b7db1c64236d92de3b3ed32e5d6bf56" # account abstraction config # Sepolia smart_wallet: - eth_rpc_url: https://sepolia.gateway.tenderly.co + eth_rpc_url: https://sepolia.drpc.org eth_ws_url: wss://sepolia.gateway.tenderly.co bundler_url: https://bundler-sepolia.avaprotocol.org factory_address: 0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7 From 8e4ad91b18e2e95b0912b47f6a0706d5975fbf34 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 21:26:24 -0800 Subject: [PATCH 20/51] add information about apikey --- .github/workflows/run-test-on-pr.yml | 9 +++++---- README.md | 6 ++++-- package.json | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 25a2e9e..89c4962 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -10,14 +10,11 @@ jobs: environment: test # The below environment variables are only available in the test environment env: - # Dummy api key - # ${{ secrets.TEST_API_KEY }} - TEST_API_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBdmFQcm90b2NvbCIsInN1YiI6ImFwaWtleSIsImV4cCI6MjA0NzQzNTg2Niwicm9sZXMiOlsiYWRtaW4iXX0.C7-WZRLQDxLCG4RQ0NLyuncWTF0nqH5XwioUaIdJ-OQ" TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} ENDPOINT: localhost:2206 - + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -49,7 +46,11 @@ jobs: sleep 5 done + echo "TEST_API_KEY=$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" >> $GITHUB_ENV + - name: Run tests run: | + docker compose run out/ap create-api-key --role=admin --subject=apikey + export TEST_API_KEY=$(docker compose exec ./out/ap create-api-key --role=admin --subject=apikey) #npm test npx jest tests/deleteTask.test.ts \ No newline at end of file diff --git a/README.md b/README.md index f8af585..faf106d 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. docker compose up -d ``` -3. Run the test command. This will test the SDK against test server, configured in `.env.test`. +4. Run the test command. This will test the SDK against test server, configured in `.env.test`. ```bash # Run all tests @@ -89,7 +89,9 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. npm run test:select -- ``` -4. In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first. + Note: to generate an api for `TEST_API_KEY`, bring up the docker compose and run `npm run gen-api-key`. + +5. In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first. ```bash npm run test:select -- "createTask|cancelTask" ``` diff --git a/package.json b/package.json index e58b7e6..a7249a1 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/new-task-data-structure/protobuf/avs.proto > grpc_codegen/avs.proto", "gen-protoc": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc_codegen/ --grpc_out=grpc_js:./grpc_codegen/ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./grpc_codegen --proto_path=./grpc_codegen grpc_codegen/avs.proto", "build": "tsup src/index.ts --format cjs,esm --dts", + "gen-apikey": "docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey", "test": "jest --config jest.config.cjs", "test:select": "npm run test -- --testNamePattern", "changeset": "changeset", From fefd122ef16e058f54ebacb62bf4dde062e6e684 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 21:28:40 -0800 Subject: [PATCH 21/51] improve test reliabilioty --- .github/workflows/run-test-on-pr.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 89c4962..cb388e5 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -39,7 +39,7 @@ jobs: - name: Install dependencies run: npm ci - - name: ensure the aggregator is ready + - name: ensure the aggregator and env is ready run: | until curl --output /dev/null --silent --fail http://localhost:1323/telemetry; do printf '.' @@ -51,6 +51,4 @@ jobs: - name: Run tests run: | docker compose run out/ap create-api-key --role=admin --subject=apikey - export TEST_API_KEY=$(docker compose exec ./out/ap create-api-key --role=admin --subject=apikey) - #npm test - npx jest tests/deleteTask.test.ts \ No newline at end of file + npm test \ No newline at end of file From 33a330d9203e99bdc3266eaa40d2ddb5cbb95669 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 21:28:59 -0800 Subject: [PATCH 22/51] remove unused secret --- .github/workflows/run-test-on-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index cb388e5..c6fc4be 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -28,7 +28,6 @@ jobs: echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" echo "ENDPOINT: $ENDPOINT" - echo "TEST_PRIVATE_KEY is set: ${{ env.TEST_PRIVATE_KEY != '' }}" - name: Use Node.js uses: actions/setup-node@v4 From deb660c752d090acd9469c7c63d71713eefa322f Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 21:43:19 -0800 Subject: [PATCH 23/51] fix workflow file --- .github/workflows/run-test-on-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index c6fc4be..4cedf5f 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -49,5 +49,4 @@ jobs: - name: Run tests run: | - docker compose run out/ap create-api-key --role=admin --subject=apikey npm test \ No newline at end of file From a75597da112b51e565e230c0089c152121750302 Mon Sep 17 00:00:00 2001 From: Vinh Date: Tue, 19 Nov 2024 23:25:56 -0800 Subject: [PATCH 24/51] use pre-define dummy private key for deterministic test --- tests/basic.test.ts | 7 +++---- tests/cancelTask.test.ts | 4 +--- tests/createTask.test.ts | 4 +--- tests/deleteTask.test.ts | 7 ++++--- tests/fixture.ts | 3 +++ tests/getAddresses.test.ts | 5 ++--- tests/getTask.test.ts | 4 +--- tests/listTasks.test.ts | 4 +--- 8 files changed, 16 insertions(+), 22 deletions(-) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 2f51c73..5f228e6 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -4,7 +4,7 @@ import Client from "../src/index"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,13 +12,11 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar('TEST_API_KEY'), - TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar('TOKEN_CONTRACT'), ORACLE_CONTRACT: requireEnvVar('ORACLE_CONTRACT'), ENDPOINT: requireEnvVar('ENDPOINT'), @@ -123,7 +121,7 @@ describe("Client E2E Tests", () => { test("createWallet", async () => { const result = await client.createWallet({salt: "123"}, { authKey }); - expect(result?.address).toEqual("0x2Ca3B219f7A22185693D10051EeD9C29EC3e8f8e"); + expect(result?.address).toHaveLength(42); expect(result?.salt).toEqual("123"); expect(result?.factoryAddress).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); }); @@ -171,6 +169,7 @@ describe("Client E2E Tests", () => { expect(tasks2.length).toBeGreaterThanOrEqual(1); const task1 = tasks1.find(t => t.id == result1.id); + console.log("task1", tasks1, task1); expect(tasks1.find(t => t.id == result2.id)).toBe(undefined); expect(task1?.id).toEqual(result1.id); expect(task1?.memo).toEqual('task1 test'); diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 6139584..6bc13c7 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -13,13 +13,11 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index 5f24320..5016651 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,13 +12,11 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index 5c7bbdc..e416310 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,13 +12,11 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -97,6 +95,7 @@ describe("deleteTask Tests", () => { console.log("Authenticating with API key ..."); const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; + console.log("Got key exchange...", authKey); console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); const getAddressesRes = await client.listSmartWallets({ authKey }); @@ -114,6 +113,7 @@ describe("deleteTask Tests", () => { }); test("should delete task when authenticated with API key", async () => { + console.log("delete task with authkey...", authKey); const result = await client.deleteTask(createdTaskId, { authKey }); expect(result).toBe(true); @@ -147,6 +147,7 @@ describe("deleteTask Tests", () => { console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); const getAddressesRes = await client.listSmartWallets({ authKey }); + console.log(`got wallet`, getAddressesRes); smartWalletAddress = getAddressesRes[0].address; console.log(`Smart wallet created: ${smartWalletAddress}`); diff --git a/tests/fixture.ts b/tests/fixture.ts index 0b8c16b..eaf7bd7 100644 --- a/tests/fixture.ts +++ b/tests/fixture.ts @@ -2,6 +2,9 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { UlidMonotonic } from "id128"; import { requireEnvVar } from "./utils"; +// Dummy private key for determinictics test +export const TEST_PRIVATE_KEY = "0x677240d3b2d8a167e536969785de1bb9f893ed0593682dc8c4dbaf8980d325ee" + export const sampleTask1 = { smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', startAt: Math.floor(Date.now() / 1000) + 30, diff --git a/tests/getAddresses.test.ts b/tests/getAddresses.test.ts index c0d79e7..8075949 100644 --- a/tests/getAddresses.test.ts +++ b/tests/getAddresses.test.ts @@ -3,19 +3,18 @@ import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { TEST_PRIVATE_KEY } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); - // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index 183676d..18ab17f 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -13,13 +13,11 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index 941ccd1..307b73a 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,13 +12,11 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, - TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), From 504d97aa478e5e5c3587c7880bd1018c2a2e6f50 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 01:09:35 -0800 Subject: [PATCH 25/51] implement trigger --- grpc_codegen/avs.proto | 60 ++--- grpc_codegen/avs_pb.d.ts | 97 ++++--- grpc_codegen/avs_pb.js | 541 ++++++++++++++++++++++++++++----------- src/builder.ts | 75 ++++++ src/index.ts | 12 +- src/task.ts | 18 +- tests/basic.test.ts | 2 +- tests/createTask.test.ts | 129 ++++++++++ tests/fixture.ts | 2 +- 9 files changed, 708 insertions(+), 228 deletions(-) diff --git a/grpc_codegen/avs.proto b/grpc_codegen/avs.proto index 7b4fb2a..61bc670 100644 --- a/grpc_codegen/avs.proto +++ b/grpc_codegen/avs.proto @@ -39,20 +39,12 @@ message SyncTasksReq { int64 monotonic_clock = 4; } -enum TriggerType { - ManualTrigger = 0; - FixedEpochTrigger = 1; - CronTrigger = 2; - BlockTrigger = 3; - EventTrigger = 4; -} - message FixedEpochCondition { - repeated int64 epoches = 1; + repeated int64 epochs = 1; } // Simple timebase or cron syntax. message CronCondition { - repeated string cron_table = 1; + repeated string schedule = 1; } message BlockCondition { @@ -75,19 +67,19 @@ message EventCondition { message TaskTrigger { oneof trigger_type { - bool manual = 2; + bool manual = 1; // run at a specific epoch, name inspired by unix `at` utility - FixedEpochCondition at = 3; + FixedEpochCondition fixed_time = 2; // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio - CronCondition cron = 4; + CronCondition cron = 3; // currently the only support syntax is every blocks - BlockCondition block = 5; + BlockCondition block = 4; // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address - EventCondition event = 6; + EventCondition event = 5; } } @@ -122,10 +114,10 @@ message SyncTasksResp { // TaskStatus represents status of the task. The transition is as follow enum TaskStatus { - Active = 0; + Active = 0; Completed = 1; - Failed = 2; - Canceled = 3; + Failed = 2; + Canceled = 3; Executing = 4; } @@ -152,9 +144,10 @@ message ContractReadNode { message GraphQLQueryNode { - // TODO: support graphql variable string url = 1; string query = 2; + + map variables = 3; } message RestAPINode { @@ -180,7 +173,7 @@ message Condition { } message BranchNode { - repeated Condition conditions = 1; + repeated Condition conditions = 1; } message FilterNode { @@ -188,6 +181,13 @@ message FilterNode { string expression = 1; } +// LoopNode currently not support, but we pre-defined to reverse the field id +message LoopNode { + // name the iteration key and value. + string iter_var = 1; + string iter_key = 2; +} + // The edge is relationship or direct between node message TaskEdge { string id = 1 ; @@ -216,7 +216,8 @@ message TaskNode { // CustomCode allow to run arbitraty JavaScript. BranchNode branch = 15; FilterNode filter = 16; - CustomCodeNode custom_code = 17; + LoopNode loop = 17; + CustomCodeNode custom_code = 18; } } @@ -227,24 +228,24 @@ message Execution { } message Task { - string id = 1; + string id = 1; string owner = 2; string smart_wallet_address = 3; // task won't be check before this - int64 start_at = 5; + int64 start_at = 4; // task won't be run/check after this - int64 expired_at = 6; + int64 expired_at = 5; // arbitrary data about this task. has a limit of 255 character - string memo = 7; + string memo = 6; - int64 completed_at = 8; + int64 completed_at = 7; // limit on how many time this task can run. Set to 0 will make it run unlimited until cancelling or reaching its expired time - int64 max_execution = 10; + int64 max_execution = 8; TaskStatus status = 9; - TaskTrigger trigger = 4; + TaskTrigger trigger = 10; repeated TaskNode nodes = 11; repeated TaskEdge edges = 12; @@ -258,8 +259,7 @@ message CreateTaskReq { int64 start_at = 2; int64 expired_at = 3; - // A repeatable task will continue to be run - bool repeatable = 4; + int64 max_execution = 4; // the smart wallet address that will be used to run this task // When leaving out, we will use the default(salt=0) wallet diff --git a/grpc_codegen/avs_pb.d.ts b/grpc_codegen/avs_pb.d.ts index e100d64..ac66f5d 100644 --- a/grpc_codegen/avs_pb.d.ts +++ b/grpc_codegen/avs_pb.d.ts @@ -153,10 +153,10 @@ export namespace SyncTasksReq { } export class FixedEpochCondition extends jspb.Message { - clearEpochesList(): void; - getEpochesList(): Array; - setEpochesList(value: Array): FixedEpochCondition; - addEpoches(value: number, index?: number): number; + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; @@ -170,15 +170,15 @@ export class FixedEpochCondition extends jspb.Message { export namespace FixedEpochCondition { export type AsObject = { - epochesList: Array, + epochsList: Array, } } export class CronCondition extends jspb.Message { - clearCronTableList(): void; - getCronTableList(): Array; - setCronTableList(value: Array): CronCondition; - addCronTable(value: string, index?: number): string; + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CronCondition.AsObject; @@ -192,7 +192,7 @@ export class CronCondition extends jspb.Message { export namespace CronCondition { export type AsObject = { - cronTableList: Array, + scheduleList: Array, } } @@ -243,10 +243,10 @@ export class TaskTrigger extends jspb.Message { getManual(): boolean; setManual(value: boolean): TaskTrigger; - hasAt(): boolean; - clearAt(): void; - getAt(): FixedEpochCondition | undefined; - setAt(value?: FixedEpochCondition): TaskTrigger; + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger; hasCron(): boolean; clearCron(): void; @@ -278,7 +278,7 @@ export class TaskTrigger extends jspb.Message { export namespace TaskTrigger { export type AsObject = { manual: boolean, - at?: FixedEpochCondition.AsObject, + fixedTime?: FixedEpochCondition.AsObject, cron?: CronCondition.AsObject, block?: BlockCondition.AsObject, event?: EventCondition.AsObject, @@ -286,11 +286,11 @@ export namespace TaskTrigger { export enum TriggerTypeCase { TRIGGER_TYPE_NOT_SET = 0, - MANUAL = 2, - AT = 3, - CRON = 4, - BLOCK = 5, - EVENT = 6, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, } } @@ -405,6 +405,9 @@ export class GraphQLQueryNode extends jspb.Message { getQuery(): string; setQuery(value: string): GraphQLQueryNode; + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; @@ -419,6 +422,8 @@ export namespace GraphQLQueryNode { export type AsObject = { url: string, query: string, + + variablesMap: Array<[string, string]>, } } @@ -544,6 +549,29 @@ export namespace FilterNode { } } +export class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +export namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + export class TaskEdge extends jspb.Message { getId(): string; setId(value: string): TaskEdge; @@ -611,6 +639,11 @@ export class TaskNode extends jspb.Message { getFilter(): FilterNode | undefined; setFilter(value?: FilterNode): TaskNode; + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode; + hasCustomCode(): boolean; clearCustomCode(): void; getCustomCode(): CustomCodeNode | undefined; @@ -639,6 +672,7 @@ export namespace TaskNode { restApi?: RestAPINode.AsObject, branch?: BranchNode.AsObject, filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, customCode?: CustomCodeNode.AsObject, } @@ -651,7 +685,8 @@ export namespace TaskNode { REST_API = 14, BRANCH = 15, FILTER = 16, - CUSTOM_CODE = 17, + LOOP = 17, + CUSTOM_CODE = 18, } } @@ -697,8 +732,8 @@ export class Task extends jspb.Message { setMemo(value: string): Task; getCompletedAt(): number; setCompletedAt(value: number): Task; - getRecurring(): boolean; - setRecurring(value: boolean): Task; + getMaxExecution(): number; + setMaxExecution(value: number): Task; getStatus(): TaskStatus; setStatus(value: TaskStatus): Task; @@ -738,7 +773,7 @@ export namespace Task { expiredAt: number, memo: string, completedAt: number, - recurring: boolean, + maxExecution: number, status: TaskStatus, trigger?: TaskTrigger.AsObject, nodesList: Array, @@ -757,8 +792,8 @@ export class CreateTaskReq extends jspb.Message { setStartAt(value: number): CreateTaskReq; getExpiredAt(): number; setExpiredAt(value: number): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; getSmartWalletAddress(): string; setSmartWalletAddress(value: string): CreateTaskReq; getMemo(): string; @@ -787,7 +822,7 @@ export namespace CreateTaskReq { trigger?: TaskTrigger.AsObject, startAt: number, expiredAt: number, - repeatable: boolean, + maxExecution: number, smartWalletAddress: string, memo: string, nodesList: Array, @@ -1114,14 +1149,6 @@ export namespace CreateWalletResp { } } -export enum TriggerType { - MANUALTRIGGER = 0, - FIXEDEPOCHTRIGGER = 1, - CRONTRIGGER = 2, - BLOCKTRIGGER = 3, - EVENTTRIGGER = 4, -} - export enum Error { UNKNOWERROR = 0, RPCNODEERROR = 1000, diff --git a/grpc_codegen/avs_pb.js b/grpc_codegen/avs_pb.js index f951868..57ec579 100644 --- a/grpc_codegen/avs_pb.js +++ b/grpc_codegen/avs_pb.js @@ -54,6 +54,7 @@ goog.exportSymbol('proto.aggregator.ListTasksReq', null, global); goog.exportSymbol('proto.aggregator.ListTasksResp', null, global); goog.exportSymbol('proto.aggregator.ListWalletReq', null, global); goog.exportSymbol('proto.aggregator.ListWalletResp', null, global); +goog.exportSymbol('proto.aggregator.LoopNode', null, global); goog.exportSymbol('proto.aggregator.NonceRequest', null, global); goog.exportSymbol('proto.aggregator.NonceResp', null, global); goog.exportSymbol('proto.aggregator.RestAPINode', null, global); @@ -67,7 +68,6 @@ goog.exportSymbol('proto.aggregator.TaskNode.TaskTypeCase', null, global); goog.exportSymbol('proto.aggregator.TaskStatus', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger.TriggerTypeCase', null, global); -goog.exportSymbol('proto.aggregator.TriggerType', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); /** @@ -490,6 +490,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.aggregator.FilterNode.displayName = 'proto.aggregator.FilterNode'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.LoopNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.LoopNode.displayName = 'proto.aggregator.LoopNode'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1971,7 +1992,7 @@ proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeIn */ proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { var f, obj = { - epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -2011,7 +2032,7 @@ proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, case 1: var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); for (var i = 0; i < values.length; i++) { - msg.addEpoches(values[i]); + msg.addEpochs(values[i]); } break; default: @@ -2043,7 +2064,7 @@ proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { */ proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEpochesList(); + f = message.getEpochsList(); if (f.length > 0) { writer.writePackedInt64( 1, @@ -2054,10 +2075,10 @@ proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, /** - * repeated int64 epoches = 1; + * repeated int64 epochs = 1; * @return {!Array} */ -proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { +proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; @@ -2066,7 +2087,7 @@ proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { * @param {!Array} value * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { +proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; @@ -2076,7 +2097,7 @@ proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) * @param {number=} opt_index * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { +proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; @@ -2085,8 +2106,8 @@ proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_ * Clears the list making it empty but non-null. * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { - return this.setEpochesList([]); +proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; @@ -2129,7 +2150,7 @@ proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance */ proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -2168,7 +2189,7 @@ proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.addCronTable(value); + msg.addSchedule(value); break; default: reader.skipField(); @@ -2199,7 +2220,7 @@ proto.aggregator.CronCondition.prototype.serializeBinary = function() { */ proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCronTableList(); + f = message.getScheduleList(); if (f.length > 0) { writer.writeRepeatedString( 1, @@ -2210,10 +2231,10 @@ proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, write /** - * repeated string cron_table = 1; + * repeated string schedule = 1; * @return {!Array} */ -proto.aggregator.CronCondition.prototype.getCronTableList = function() { +proto.aggregator.CronCondition.prototype.getScheduleList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; @@ -2222,7 +2243,7 @@ proto.aggregator.CronCondition.prototype.getCronTableList = function() { * @param {!Array} value * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { +proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { return jspb.Message.setField(this, 1, value || []); }; @@ -2232,7 +2253,7 @@ proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { * @param {number=} opt_index * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_index) { +proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; @@ -2241,8 +2262,8 @@ proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_inde * Clears the list making it empty but non-null. * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.CronCondition.prototype.clearCronTableList = function() { - return this.setCronTableList([]); +proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; @@ -2515,18 +2536,18 @@ proto.aggregator.EventCondition.prototype.setExpression = function(value) { * @private {!Array>} * @const */ -proto.aggregator.TaskTrigger.oneofGroups_ = [[2,3,4,5,6]]; +proto.aggregator.TaskTrigger.oneofGroups_ = [[1,2,3,4,5]]; /** * @enum {number} */ proto.aggregator.TaskTrigger.TriggerTypeCase = { TRIGGER_TYPE_NOT_SET: 0, - MANUAL: 2, - AT: 3, - CRON: 4, - BLOCK: 5, - EVENT: 6 + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 }; /** @@ -2567,8 +2588,8 @@ proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) */ proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) @@ -2608,26 +2629,26 @@ proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) } var field = reader.getFieldNumber(); switch (field) { - case 2: + case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setManual(value); break; - case 3: + case 2: var value = new proto.aggregator.FixedEpochCondition; reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); - msg.setAt(value); + msg.setFixedTime(value); break; - case 4: + case 3: var value = new proto.aggregator.CronCondition; reader.readMessage(value,proto.aggregator.CronCondition.deserializeBinaryFromReader); msg.setCron(value); break; - case 5: + case 4: var value = new proto.aggregator.BlockCondition; reader.readMessage(value,proto.aggregator.BlockCondition.deserializeBinaryFromReader); msg.setBlock(value); break; - case 6: + case 5: var value = new proto.aggregator.EventCondition; reader.readMessage(value,proto.aggregator.EventCondition.deserializeBinaryFromReader); msg.setEvent(value); @@ -2661,17 +2682,17 @@ proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { */ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeBool( - 2, + 1, f ); } - f = message.getAt(); + f = message.getFixedTime(); if (f != null) { writer.writeMessage( - 3, + 2, f, proto.aggregator.FixedEpochCondition.serializeBinaryToWriter ); @@ -2679,7 +2700,7 @@ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) f = message.getCron(); if (f != null) { writer.writeMessage( - 4, + 3, f, proto.aggregator.CronCondition.serializeBinaryToWriter ); @@ -2687,7 +2708,7 @@ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) f = message.getBlock(); if (f != null) { writer.writeMessage( - 5, + 4, f, proto.aggregator.BlockCondition.serializeBinaryToWriter ); @@ -2695,7 +2716,7 @@ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) f = message.getEvent(); if (f != null) { writer.writeMessage( - 6, + 5, f, proto.aggregator.EventCondition.serializeBinaryToWriter ); @@ -2704,11 +2725,11 @@ proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) /** - * optional bool manual = 2; + * optional bool manual = 1; * @return {boolean} */ proto.aggregator.TaskTrigger.prototype.getManual = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; @@ -2717,7 +2738,7 @@ proto.aggregator.TaskTrigger.prototype.getManual = function() { * @return {!proto.aggregator.TaskTrigger} returns this */ proto.aggregator.TaskTrigger.prototype.setManual = function(value) { - return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; @@ -2726,7 +2747,7 @@ proto.aggregator.TaskTrigger.prototype.setManual = function(value) { * @return {!proto.aggregator.TaskTrigger} returns this */ proto.aggregator.TaskTrigger.prototype.clearManual = function() { - return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], undefined); + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], undefined); }; @@ -2735,17 +2756,17 @@ proto.aggregator.TaskTrigger.prototype.clearManual = function() { * @return {boolean} */ proto.aggregator.TaskTrigger.prototype.hasManual = function() { - return jspb.Message.getField(this, 2) != null; + return jspb.Message.getField(this, 1) != null; }; /** - * optional FixedEpochCondition at = 3; + * optional FixedEpochCondition fixed_time = 2; * @return {?proto.aggregator.FixedEpochCondition} */ -proto.aggregator.TaskTrigger.prototype.getAt = function() { +proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { return /** @type{?proto.aggregator.FixedEpochCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3)); + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2)); }; @@ -2753,8 +2774,8 @@ proto.aggregator.TaskTrigger.prototype.getAt = function() { * @param {?proto.aggregator.FixedEpochCondition|undefined} value * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.TaskTrigger.prototype.setAt = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; @@ -2762,8 +2783,8 @@ proto.aggregator.TaskTrigger.prototype.setAt = function(value) { * Clears the message field making it undefined. * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.TaskTrigger.prototype.clearAt = function() { - return this.setAt(undefined); +proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(undefined); }; @@ -2771,18 +2792,18 @@ proto.aggregator.TaskTrigger.prototype.clearAt = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskTrigger.prototype.hasAt = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional CronCondition cron = 4; + * optional CronCondition cron = 3; * @return {?proto.aggregator.CronCondition} */ proto.aggregator.TaskTrigger.prototype.getCron = function() { return /** @type{?proto.aggregator.CronCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4)); + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3)); }; @@ -2791,7 +2812,7 @@ proto.aggregator.TaskTrigger.prototype.getCron = function() { * @return {!proto.aggregator.TaskTrigger} returns this */ proto.aggregator.TaskTrigger.prototype.setCron = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; @@ -2809,17 +2830,17 @@ proto.aggregator.TaskTrigger.prototype.clearCron = function() { * @return {boolean} */ proto.aggregator.TaskTrigger.prototype.hasCron = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 3) != null; }; /** - * optional BlockCondition block = 5; + * optional BlockCondition block = 4; * @return {?proto.aggregator.BlockCondition} */ proto.aggregator.TaskTrigger.prototype.getBlock = function() { return /** @type{?proto.aggregator.BlockCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5)); + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4)); }; @@ -2828,7 +2849,7 @@ proto.aggregator.TaskTrigger.prototype.getBlock = function() { * @return {!proto.aggregator.TaskTrigger} returns this */ proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; @@ -2846,17 +2867,17 @@ proto.aggregator.TaskTrigger.prototype.clearBlock = function() { * @return {boolean} */ proto.aggregator.TaskTrigger.prototype.hasBlock = function() { - return jspb.Message.getField(this, 5) != null; + return jspb.Message.getField(this, 4) != null; }; /** - * optional EventCondition event = 6; + * optional EventCondition event = 5; * @return {?proto.aggregator.EventCondition} */ proto.aggregator.TaskTrigger.prototype.getEvent = function() { return /** @type{?proto.aggregator.EventCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6)); + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5)); }; @@ -2865,7 +2886,7 @@ proto.aggregator.TaskTrigger.prototype.getEvent = function() { * @return {!proto.aggregator.TaskTrigger} returns this */ proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; @@ -2883,7 +2904,7 @@ proto.aggregator.TaskTrigger.prototype.clearEvent = function() { * @return {boolean} */ proto.aggregator.TaskTrigger.prototype.hasEvent = function() { - return jspb.Message.getField(this, 6) != null; + return jspb.Message.getField(this, 5) != null; }; @@ -3671,7 +3692,8 @@ proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInsta proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { @@ -3716,6 +3738,12 @@ proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, re var value = /** @type {string} */ (reader.readString()); msg.setQuery(value); break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; default: reader.skipField(); break; @@ -3759,6 +3787,10 @@ proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, wr f ); } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } }; @@ -3798,6 +3830,28 @@ proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { }; +/** + * map variables = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.GraphQLQueryNode} returns this + */ +proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this;}; + + @@ -4664,6 +4718,166 @@ proto.aggregator.FilterNode.prototype.setExpression = function(value) { +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.LoopNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.LoopNode} + */ +proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode; + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.LoopNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.LoopNode} + */ +proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setIterVar(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.LoopNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string iter_var = 1; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getIterVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string iter_key = 2; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getIterKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setIterKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -4860,7 +5074,7 @@ proto.aggregator.TaskEdge.prototype.setTarget = function(value) { * @private {!Array>} * @const */ -proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17]]; +proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17,18]]; /** * @enum {number} @@ -4874,7 +5088,8 @@ proto.aggregator.TaskNode.TaskTypeCase = { REST_API: 14, BRANCH: 15, FILTER: 16, - CUSTOM_CODE: 17 + LOOP: 17, + CUSTOM_CODE: 18 }; /** @@ -4924,6 +5139,7 @@ proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) }; @@ -5005,6 +5221,11 @@ proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { msg.setFilter(value); break; case 17: + var value = new proto.aggregator.LoopNode; + reader.readMessage(value,proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: var value = new proto.aggregator.CustomCodeNode; reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); msg.setCustomCode(value); @@ -5108,11 +5329,19 @@ proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { proto.aggregator.FilterNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getLoop(); if (f != null) { writer.writeMessage( 17, f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, proto.aggregator.CustomCodeNode.serializeBinaryToWriter ); } @@ -5415,12 +5644,49 @@ proto.aggregator.TaskNode.prototype.hasFilter = function() { /** - * optional CustomCodeNode custom_code = 17; + * optional LoopNode loop = 17; + * @return {?proto.aggregator.LoopNode} + */ +proto.aggregator.TaskNode.prototype.getLoop = function() { + return /** @type{?proto.aggregator.LoopNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17)); +}; + + +/** + * @param {?proto.aggregator.LoopNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional CustomCodeNode custom_code = 18; * @return {?proto.aggregator.CustomCodeNode} */ proto.aggregator.TaskNode.prototype.getCustomCode = function() { return /** @type{?proto.aggregator.CustomCodeNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17)); + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18)); }; @@ -5429,7 +5695,7 @@ proto.aggregator.TaskNode.prototype.getCustomCode = function() { * @return {!proto.aggregator.TaskNode} returns this */ proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); }; @@ -5447,7 +5713,7 @@ proto.aggregator.TaskNode.prototype.clearCustomCode = function() { * @return {boolean} */ proto.aggregator.TaskNode.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 17) != null; + return jspb.Message.getField(this, 18) != null; }; @@ -5683,11 +5949,11 @@ proto.aggregator.Task.toObject = function(includeInstance, msg) { id: jspb.Message.getFieldWithDefault(msg, 1, ""), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - memo: jspb.Message.getFieldWithDefault(msg, 7, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), - recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), status: jspb.Message.getFieldWithDefault(msg, 9, 0), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), nodesList: jspb.Message.toObjectList(msg.getNodesList(), @@ -5744,31 +6010,31 @@ proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { var value = /** @type {string} */ (reader.readString()); msg.setSmartWalletAddress(value); break; - case 5: + case 4: var value = /** @type {number} */ (reader.readInt64()); msg.setStartAt(value); break; - case 6: + case 5: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiredAt(value); break; - case 7: + case 6: var value = /** @type {string} */ (reader.readString()); msg.setMemo(value); break; - case 8: + case 7: var value = /** @type {number} */ (reader.readInt64()); msg.setCompletedAt(value); break; - case 10: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRecurring(value); + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxExecution(value); break; case 9: var value = /** @type {!proto.aggregator.TaskStatus} */ (reader.readEnum()); msg.setStatus(value); break; - case 4: + case 10: var value = new proto.aggregator.TaskTrigger; reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); @@ -5841,35 +6107,35 @@ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { f = message.getStartAt(); if (f !== 0) { writer.writeInt64( - 5, + 4, f ); } f = message.getExpiredAt(); if (f !== 0) { writer.writeInt64( - 6, + 5, f ); } f = message.getMemo(); if (f.length > 0) { writer.writeString( - 7, + 6, f ); } f = message.getCompletedAt(); if (f !== 0) { writer.writeInt64( - 8, + 7, f ); } - f = message.getRecurring(); - if (f) { - writer.writeBool( - 10, + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, f ); } @@ -5883,7 +6149,7 @@ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { f = message.getTrigger(); if (f != null) { writer.writeMessage( - 4, + 10, f, proto.aggregator.TaskTrigger.serializeBinaryToWriter ); @@ -5970,11 +6236,11 @@ proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { /** - * optional int64 start_at = 5; + * optional int64 start_at = 4; * @return {number} */ proto.aggregator.Task.prototype.getStartAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; @@ -5983,16 +6249,16 @@ proto.aggregator.Task.prototype.getStartAt = function() { * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional int64 expired_at = 6; + * optional int64 expired_at = 5; * @return {number} */ proto.aggregator.Task.prototype.getExpiredAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; @@ -6001,16 +6267,16 @@ proto.aggregator.Task.prototype.getExpiredAt = function() { * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional string memo = 7; + * optional string memo = 6; * @return {string} */ proto.aggregator.Task.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; @@ -6019,16 +6285,16 @@ proto.aggregator.Task.prototype.getMemo = function() { * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * optional int64 completed_at = 8; + * optional int64 completed_at = 7; * @return {number} */ proto.aggregator.Task.prototype.getCompletedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; @@ -6037,25 +6303,25 @@ proto.aggregator.Task.prototype.getCompletedAt = function() { * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional bool recurring = 10; - * @return {boolean} + * optional int64 max_execution = 8; + * @return {number} */ -proto.aggregator.Task.prototype.getRecurring = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); +proto.aggregator.Task.prototype.getMaxExecution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * @param {boolean} value + * @param {number} value * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Task.prototype.setRecurring = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); +proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; @@ -6078,12 +6344,12 @@ proto.aggregator.Task.prototype.setStatus = function(value) { /** - * optional TaskTrigger trigger = 4; + * optional TaskTrigger trigger = 10; * @return {?proto.aggregator.TaskTrigger} */ proto.aggregator.Task.prototype.getTrigger = function() { return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4)); + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10)); }; @@ -6092,7 +6358,7 @@ proto.aggregator.Task.prototype.getTrigger = function() { * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 10, value); }; @@ -6110,7 +6376,7 @@ proto.aggregator.Task.prototype.clearTrigger = function() { * @return {boolean} */ proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 10) != null; }; @@ -6270,7 +6536,7 @@ proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), memo: jspb.Message.getFieldWithDefault(msg, 6, ""), nodesList: jspb.Message.toObjectList(msg.getNodesList(), @@ -6327,8 +6593,8 @@ proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reade msg.setExpiredAt(value); break; case 4: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxExecution(value); break; case 5: var value = /** @type {string} */ (reader.readString()); @@ -6399,9 +6665,9 @@ proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, write f ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool( + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( 4, f ); @@ -6513,20 +6779,20 @@ proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { /** - * optional bool repeatable = 4; - * @return {boolean} + * optional int64 max_execution = 4; + * @return {number} */ -proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {boolean} value + * @param {number} value * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); +proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; @@ -8869,17 +9135,6 @@ proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) }; -/** - * @enum {number} - */ -proto.aggregator.TriggerType = { - MANUALTRIGGER: 0, - FIXEDEPOCHTRIGGER: 1, - CRONTRIGGER: 2, - BLOCKTRIGGER: 3, - EVENTTRIGGER: 4 -}; - /** * @enum {number} */ diff --git a/src/builder.ts b/src/builder.ts index 0ee8320..15e271c 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -32,3 +32,78 @@ export const buildTaskEdge = ({id, source, target}): avs_pb.TaskEdge => { return edge; } + + +export const buildTrigger = (payload): avs_pb.TaskTrigger => { + const trigger = new avs_pb.TaskTrigger(); + + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + + return trigger; + } + + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + + trigger.setEvent(event); + + return trigger; + } + + throw new Error("missing trigger"); + } +} + +export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger) => { + const base = { + trigger_type:trigger.getTriggerTypeCase() + } + + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() } + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() } + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() } + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() } + break; + } + + return base; +} + +export const nodeFromGRPC = (node) => { + return node.toObject(); +} diff --git a/src/index.ts b/src/index.ts index dd8483c..c062c62 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,7 +24,7 @@ import { } from "./types"; import { - buildContractWrite, buildTaskEdge + buildContractWrite, buildTaskEdge, buildTrigger } from "./builder"; class BaseClient { @@ -188,12 +188,15 @@ export default class Client extends BaseClient { async createTask(payload: any, options: RequestOptions): Promise { const request = new avs_pb.CreateTaskReq(); + // TODO: add client side validation request.setSmartWalletAddress(payload.smartWalletAddress); request.setStartAt(payload.startAt); - request.setExpiredAt(payload.expiredAt); - request.setMemo(payload.memo); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + + request.setTrigger(buildTrigger(payload.trigger)); - // request.setTrigger(payload.trigger); let nodes = []; for (const node of payload.nodes) { const n = new avs_pb.TaskNode(); @@ -228,7 +231,6 @@ export default class Client extends BaseClient { edges.push(buildTaskEdge(edge)); } request.setEdgesList(edges); - //const request = aggPb.CreateTaskReq.create(payload); const result = await this._callRPC< avs_pb.CreateTaskResp diff --git a/src/task.ts b/src/task.ts index 7063023..478c642 100644 --- a/src/task.ts +++ b/src/task.ts @@ -1,13 +1,6 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { TaskType } from "./types"; - -function buildNodeFromGRPC(node) { - return node.toObject(); -} - -function buildTriggerFromGRPC(trigger) { - return trigger?.toObject(); -} +import { triggerFromGRPC, nodeFromGRPC } from "./builder"; class Task implements TaskType { id: string; @@ -27,22 +20,21 @@ class Task implements TaskType { completedAt: number; repeatable: boolean; executionsList: any[]; - // Add other missing properties here constructor(task: avs_pb.Task) { - this.id = task.getId()?.toString() || ""; + this.id = task.getId() || ""; this.status = task.getStatus().toString(); this.owner = task.getOwner(); this.smartWalletAddress = task.getSmartWalletAddress(); - this.trigger = buildTriggerFromGRPC(task.getTrigger()); - this.nodes = task.getNodesList().map(node => buildNodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); + this.nodes = task.getNodesList().map(node => nodeFromGRPC(node)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - //this.repeatable = task.getRepeatable(); this.executionsList = task.getExecutionsList(); + this.maxExecution = task.getMaxExecution(); } } diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 5f228e6..22f9bd1 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -152,6 +152,7 @@ describe("Client E2E Tests", () => { expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.trigger.block.interval).toEqual(5); }); test("listTask", async () => { @@ -169,7 +170,6 @@ describe("Client E2E Tests", () => { expect(tasks2.length).toBeGreaterThanOrEqual(1); const task1 = tasks1.find(t => t.id == result1.id); - console.log("task1", tasks1, task1); expect(tasks1.find(t => t.id == result2.id)).toBe(undefined); expect(task1?.id).toEqual(result1.id); expect(task1?.memo).toEqual('task1 test'); diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index 5016651..39e43c0 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -1,3 +1,4 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; import Client from "../src"; import dotenv from "dotenv"; @@ -74,6 +75,134 @@ describe("createTask Tests", () => { { authKey } )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); + + test("create cron trigger", async () => { + const result = await client.createTask( + { + ...sampleTask1, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + cron: { schedule: ["5 4 * * *", "5 0 * 8 *"] }, + } + }, + { authKey } + ); + + const task = await client.getTask(result.id, { authKey }); + expect(task.id).toEqual(result.id); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + + expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.CRON); + expect(task.trigger.cron.schedule[0]).toEqual("5 4 * * *"); + expect(task.trigger.cron.schedule[1]).toEqual("5 0 * 8 *"); + }); + + test("create fixed time trigger", async () => { + const result = await client.createTask( + { + ...sampleTask1, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + fixedTime: { epochs: [10, 20, 30] }, + } + }, + { authKey } + ); + + const task = await client.getTask(result.id, { authKey }); + expect(task.id).toEqual(result.id); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + + console.log("task is", task); + expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME); + expect(task.trigger.fixedTime.epochs).toEqual([10, 20, 30]); + }); + + test("create event trigger", async () => { + const result = await client.createTask( + { + ...sampleTask1, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + event: { expression: `topic0 == "0x123" && topic2 == "0xdef"` }, + } + }, + { authKey } + ); + + const task = await client.getTask(result.id, { authKey }); + expect(task.id).toEqual(result.id); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + + console.log("task is", task); + expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.EVENT); + expect(task.trigger.event.expression).toEqual(`topic0 == "0x123" && topic2 == "0xdef"` ); + }); + + test("create manual trigger", async () => { + const result = await client.createTask( + { + ...sampleTask1, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + manual: true, + } + }, + { authKey } + ); + + const task = await client.getTask(result.id, { authKey }); + expect(task.id).toEqual(result.id); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + + console.log("task is", task); + expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.MANUAL); + expect(task.trigger.manual).toBe(true); + }); + + test("create block trigger", async () => { + const result = await client.createTask( + { + ...sampleTask1, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + block: { + interval: 102, + } + } + }, + { authKey } + ); + + const task = await client.getTask(result.id, { authKey }); + expect(task.id).toEqual(result.id); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + + console.log("task is", task); + expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); + expect(task.trigger.block.interval).toEqual(102); + }); + }); describe("Auth with API key", () => { diff --git a/tests/fixture.ts b/tests/fixture.ts index eaf7bd7..828e35e 100644 --- a/tests/fixture.ts +++ b/tests/fixture.ts @@ -12,7 +12,6 @@ export const sampleTask1 = { memo: `Test task`, trigger: { - trigger_type: avs_pb.TriggerType.BLOCKTRIGGER, block: { interval: 5, // run every 5 block }, @@ -34,3 +33,4 @@ export const sampleTask1 = { }], }; + From 262bd7cca54e8f27207da3ad0f4131fceb617507 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 01:18:26 -0800 Subject: [PATCH 26/51] update node return type --- src/builder.ts | 39 +++++++++++++++++++++++++++++++++++++-- tests/createTask.test.ts | 4 ---- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index 15e271c..b7e79cd 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -80,7 +80,7 @@ export const buildTrigger = (payload): avs_pb.TaskTrigger => { export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger) => { const base = { - trigger_type:trigger.getTriggerTypeCase() + trigger_type: trigger.getTriggerTypeCase() } switch (trigger.getTriggerTypeCase()) { @@ -105,5 +105,40 @@ export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger) => { } export const nodeFromGRPC = (node) => { - return node.toObject(); + const base = node.toObject(); + const standarize = { + task_type: node.getTaskTypeCase() + } + + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = base.branch; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; + } + + return standarize; } diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index 39e43c0..b6437c0 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -121,7 +121,6 @@ describe("createTask Tests", () => { expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - console.log("task is", task); expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME); expect(task.trigger.fixedTime.epochs).toEqual([10, 20, 30]); }); @@ -146,7 +145,6 @@ describe("createTask Tests", () => { expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - console.log("task is", task); expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.EVENT); expect(task.trigger.event.expression).toEqual(`topic0 == "0x123" && topic2 == "0xdef"` ); }); @@ -171,7 +169,6 @@ describe("createTask Tests", () => { expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - console.log("task is", task); expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.MANUAL); expect(task.trigger.manual).toBe(true); }); @@ -198,7 +195,6 @@ describe("createTask Tests", () => { expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - console.log("task is", task); expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); expect(task.trigger.block.interval).toEqual(102); }); From eebb69ebf8c3ace717b76ee869e6e2a32a421b1b Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 01:30:16 -0800 Subject: [PATCH 27/51] use vinh's rpc to run test --- config/aggregator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/aggregator.yaml b/config/aggregator.yaml index 0f25fd5..4fcf810 100644 --- a/config/aggregator.yaml +++ b/config/aggregator.yaml @@ -24,7 +24,7 @@ jwt_secret: "1b7db1c64236d92de3b3ed32e5d6bf56" # account abstraction config # Sepolia smart_wallet: - eth_rpc_url: https://sepolia.drpc.org + eth_rpc_url: "https://sepolia-rpc.asa.town/?apikey=gvbYpyPMZtS8c3ye801OHMmSJy8WndPcg3AWaFYcs3nSkgI4" eth_ws_url: wss://sepolia.gateway.tenderly.co bundler_url: https://bundler-sepolia.avaprotocol.org factory_address: 0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7 From 98aca018b2f8a674d9481e64317c88479fc484e3 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 02:22:57 -0800 Subject: [PATCH 28/51] update type --- src/builder.ts | 14 +++++++++++--- src/index.ts | 44 ++++++++++++++++++++++++-------------------- src/task.ts | 19 +++++++------------ src/types.ts | 39 +++++++++++++++++++++++++-------------- 4 files changed, 67 insertions(+), 49 deletions(-) diff --git a/src/builder.ts b/src/builder.ts index b7e79cd..e8cd6d5 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -1,5 +1,9 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; +import { + TaskTrigger +} from "./types"; + export const buildContractWrite = ({contractAddress, callData, contractABI}): avs_pb.ContractWriteNode => { const n = new avs_pb.ContractWriteNode(); n.setContractAddress(contractAddress); @@ -78,9 +82,13 @@ export const buildTrigger = (payload): avs_pb.TaskTrigger => { } } -export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger) => { +export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger | undefined): TaskTrigger => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET } + } + const base = { - trigger_type: trigger.getTriggerTypeCase() + triggerType: trigger.getTriggerTypeCase() } switch (trigger.getTriggerTypeCase()) { @@ -107,7 +115,7 @@ export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger) => { export const nodeFromGRPC = (node) => { const base = node.toObject(); const standarize = { - task_type: node.getTaskTypeCase() + taskType: node.getTaskTypeCase() } switch (node.getTaskTypeCase()) { diff --git a/src/index.ts b/src/index.ts index c062c62..78b36fe 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,25 +6,26 @@ import { getKeyRequestMessage } from "./auth"; import { AggregatorClient } from "../grpc_codegen/avs_grpc_pb"; import * as avs_pb from "../grpc_codegen/avs_pb"; import { BoolValue } from "google-protobuf/google/protobuf/wrappers_pb"; +import Task from "./task"; import { AUTH_KEY_HEADER, CancelTaskResponse, DeleteTaskResponse, RequestOptions, TaskType, -} from "./types"; -import Task from "./task"; -// Move interfaces to a separate file, e.g., types.ts -import { ClientOption, CreateTaskResponse, - GetAddressesResponse, + CreateWalletReq, + SmartWallet, GetKeyResponse, ListTasksResponse, } from "./types"; import { - buildContractWrite, buildTaskEdge, buildTrigger + buildContractRead, + buildContractWrite, + buildTaskEdge, + buildTrigger, } from "./builder"; class BaseClient { @@ -154,11 +155,11 @@ export default class Client extends BaseClient { async listSmartWallets( options: RequestOptions, - ): Promise { + ): Promise { const request = new avs_pb.ListWalletReq(); const result = await this._callRPC< - avs_pb.AddressResp, + avs_pb.ListWalletResp, avs_pb.ListWalletReq >("listWallets", request, options); @@ -171,7 +172,7 @@ export default class Client extends BaseClient { factoryAddress }: CreateWalletReq, options: RequestOptions, - ): Promise { + ): Promise { const request = new avs_pb.CreateWalletReq(); request.setSalt(salt); if (factoryAddress) { @@ -179,14 +180,18 @@ export default class Client extends BaseClient { } const result = await this._callRPC< - avs_pb.CreateWalletReq, - avs_pb.CreateWalletResp + avs_pb.CreateWalletResp, + avs_pb.CreateWalletReq >("createWallet", request, options); - return result.toObject(); + return { + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress(), + } } - async createTask(payload: any, options: RequestOptions): Promise { + async createTask(payload: any, options: RequestOptions): Promise { const request = new avs_pb.CreateTaskReq(); // TODO: add client side validation request.setSmartWalletAddress(payload.smartWalletAddress); @@ -233,15 +238,14 @@ export default class Client extends BaseClient { request.setEdgesList(edges); const result = await this._callRPC< - avs_pb.CreateTaskResp + avs_pb.CreateTaskResp, + avs_pb.CreateTaskReq >("createTask", request, options); - return { - id: result.getId(), - }; + return result.getId(); } - async listTasks(address: string, options: RequestOptions): Promise { + async listTasks(address: string, options: RequestOptions): Promise { const request = new avs_pb.ListTasksReq(); request.setSmartWalletAddress(address); @@ -267,7 +271,7 @@ export default class Client extends BaseClient { return new Task(result); } - async cancelTask(id: string, options: RequestOptions): Promise { + async cancelTask(id: string, options: RequestOptions): Promise { const request = new avs_pb.IdReq(); request.setId(id); @@ -280,7 +284,7 @@ export default class Client extends BaseClient { return result.getValue(); } - async deleteTask(id: string, options: RequestOptions): Promise { + async deleteTask(id: string, options: RequestOptions): Promise { const request = new avs_pb.IdReq(); request.setId(id); diff --git a/src/task.ts b/src/task.ts index 478c642..ccdac79 100644 --- a/src/task.ts +++ b/src/task.ts @@ -1,33 +1,28 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; -import { TaskType } from "./types"; +import { TaskType, TaskTrigger } from "./types"; import { triggerFromGRPC, nodeFromGRPC } from "./builder"; class Task implements TaskType { id: string; status: number; owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { expression: string }; - }; - nodesList: any[]; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; - repeatable: boolean; + maxExecution: number; executionsList: any[]; constructor(task: avs_pb.Task) { this.id = task.getId() || ""; - this.status = task.getStatus().toString(); + this.status = task.getStatus(); this.owner = task.getOwner(); this.smartWalletAddress = task.getSmartWalletAddress(); - this.trigger = triggerFromGRPC(task.getTrigger()); this.nodes = task.getNodesList().map(node => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); diff --git a/src/types.ts b/src/types.ts index a3d0507..d8f8061 100644 --- a/src/types.ts +++ b/src/types.ts @@ -17,19 +17,29 @@ export interface ClientOption { endpoint: string; } +export interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[], + } + block?: { + interval: number; + } +} + export interface TaskType { id: string; owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { - expression: string; - }; - }; - nodesList: Array<{ + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: Array<{ taskType: number; id: string; name: string; @@ -46,7 +56,7 @@ export interface TaskType { memo: string; completedAt: number; status: number; - repeatable: boolean; + maxExecution: number; executionsList: any[]; } @@ -69,9 +79,10 @@ export interface DeleteTaskResponse { value: boolean; } -export interface GetAddressesResponse { - owner: string; - smart_account_address: string; +export interface SmartWallet { + address: string; + salt: string; + factory: string; } export interface CreateWalletReq { From 7db6649aa06f0d6d4787f145340dc8f08c6774ad Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 02:23:09 -0800 Subject: [PATCH 29/51] add compiled file --- dist/index.d.mts | 1364 ++++++++++++++++++++++++++++++++++++++++++++ dist/index.d.ts | 1364 ++++++++++++++++++++++++++++++++++++++++++++ dist/index.js | 1407 ++++++++++++++++++++++++++-------------------- dist/index.mjs | 1407 ++++++++++++++++++++++++++-------------------- 4 files changed, 4338 insertions(+), 1204 deletions(-) create mode 100644 dist/index.d.mts create mode 100644 dist/index.d.ts diff --git a/dist/index.d.mts b/dist/index.d.mts new file mode 100644 index 0000000..1435a0b --- /dev/null +++ b/dist/index.d.mts @@ -0,0 +1,1364 @@ +import * as grpc from '@grpc/grpc-js'; +import { Metadata } from '@grpc/grpc-js'; +import * as jspb from 'google-protobuf'; +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; +import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; + +declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; + +// package: aggregator +// file: avs.proto + + + +declare class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; +} + +declare namespace IdReq { + export type AsObject = { + id: string, + } +} + +declare class Checkin extends jspb.Message { + getId(): string; + setId(value: string): Checkin; + getAddress(): string; + setAddress(value: string): Checkin; + getSignature(): string; + setSignature(value: string): Checkin; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): Checkin.Status | undefined; + setStatus(value?: Checkin.Status): Checkin; + getVersion(): string; + setVersion(value: string): Checkin; + getMetricsport(): number; + setMetricsport(value: number): Checkin; + getRemoteip(): string; + setRemoteip(value: string): Checkin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Checkin.AsObject; + static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Checkin; + static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; +} + +declare namespace Checkin { + export type AsObject = { + id: string, + address: string, + signature: string, + status?: Checkin.Status.AsObject, + version: string, + metricsport: number, + remoteip: string, + } + + + export class Status extends jspb.Message { + getUptime(): number; + setUptime(value: number): Status; + getQueuedepth(): number; + setQueuedepth(value: number): Status; + + hasLastHeartbeat(): boolean; + clearLastHeartbeat(): void; + getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; + } + + export namespace Status { + export type AsObject = { + uptime: number, + queuedepth: number, + lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + } + +} + +declare class CheckinResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckinResp.AsObject; + static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckinResp; + static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; +} + +declare namespace CheckinResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class SyncTasksReq extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksReq; + getAddress(): string; + setAddress(value: string): SyncTasksReq; + getSignature(): string; + setSignature(value: string): SyncTasksReq; + getMonotonicClock(): number; + setMonotonicClock(value: number): SyncTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksReq; + static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; +} + +declare namespace SyncTasksReq { + export type AsObject = { + id: string, + address: string, + signature: string, + monotonicClock: number, + } +} + +declare class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} + +declare namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} + +declare class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; +} + +declare namespace CronCondition { + export type AsObject = { + scheduleList: Array, + } +} + +declare class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; +} + +declare namespace BlockCondition { + export type AsObject = { + interval: number, + } +} + +declare class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; +} + +declare namespace EventCondition { + export type AsObject = { + expression: string, + } +} + +declare class TaskTrigger$1 extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger$1; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger$1; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger$1; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger$1; + + getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; + static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; +} + +declare namespace TaskTrigger$1 { + export type AsObject = { + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, + } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + +} + +declare class SyncTasksResp extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksResp; + getChecktype(): string; + setChecktype(value: string): SyncTasksResp; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): SyncTasksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksResp; + static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; +} + +declare namespace SyncTasksResp { + export type AsObject = { + id: string, + checktype: string, + trigger?: TaskTrigger$1.AsObject, + } +} + +declare class ETHTransferNode extends jspb.Message { + getDestination(): string; + setDestination(value: string): ETHTransferNode; + getAmount(): string; + setAmount(value: string): ETHTransferNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; +} + +declare namespace ETHTransferNode { + export type AsObject = { + destination: string, + amount: string, + } +} + +declare class ContractWriteNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractWriteNode; + getCallData(): string; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; +} + +declare namespace ContractWriteNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +declare namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class GraphQLQueryNode extends jspb.Message { + getUrl(): string; + setUrl(value: string): GraphQLQueryNode; + getQuery(): string; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; +} + +declare namespace GraphQLQueryNode { + export type AsObject = { + url: string, + query: string, + + variablesMap: Array<[string, string]>, + } +} + +declare class RestAPINode extends jspb.Message { + getUrl(): string; + setUrl(value: string): RestAPINode; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + getBody(): string; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; +} + +declare namespace RestAPINode { + export type AsObject = { + url: string, + + headersMap: Array<[string, string]>, + body: string, + method: string, + } +} + +declare class CustomCodeNode extends jspb.Message { + getType(): CustomCodeType; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; +} + +declare namespace CustomCodeNode { + export type AsObject = { + type: CustomCodeType, + source: string, + } +} + +declare class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; + getExpression(): string; + setExpression(value: string): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; +} + +declare namespace Condition { + export type AsObject = { + id: string, + type: string, + expression: string, + } +} + +declare class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +declare namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} + +declare class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; +} + +declare namespace FilterNode { + export type AsObject = { + expression: string, + } +} + +declare class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +declare namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + +declare class TaskEdge extends jspb.Message { + getId(): string; + setId(value: string): TaskEdge; + getSource(): string; + setSource(value: string): TaskEdge; + getTarget(): string; + setTarget(value: string): TaskEdge; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge): TaskEdge.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge; + static deserializeBinaryFromReader(message: TaskEdge, reader: jspb.BinaryReader): TaskEdge; +} + +declare namespace TaskEdge { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +declare class TaskNode extends jspb.Message { + getId(): string; + setId(value: string): TaskNode; + getName(): string; + setName(value: string): TaskNode; + + hasEthTransfer(): boolean; + clearEthTransfer(): void; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode; + + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode; + + hasGraphqlDataQuery(): boolean; + clearGraphqlDataQuery(): void; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode; + + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode; + + hasCustomCode(): boolean; + clearCustomCode(): void; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode; + + getTaskTypeCase(): TaskNode.TaskTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskNode.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode): TaskNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode; + static deserializeBinaryFromReader(message: TaskNode, reader: jspb.BinaryReader): TaskNode; +} + +declare namespace TaskNode { + export type AsObject = { + id: string, + name: string, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, + } + + export enum TaskTypeCase { + TASK_TYPE_NOT_SET = 0, + ETH_TRANSFER = 10, + CONTRACT_WRITE = 11, + CONTRACT_READ = 12, + GRAPHQL_DATA_QUERY = 13, + REST_API = 14, + BRANCH = 15, + FILTER = 16, + LOOP = 17, + CUSTOM_CODE = 18, + } + +} + +declare class Execution extends jspb.Message { + getEpoch(): number; + setEpoch(value: number): Execution; + getUserOpHash(): string; + setUserOpHash(value: string): Execution; + getError(): string; + setError(value: string): Execution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Execution.AsObject; + static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution; + static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; +} + +declare namespace Execution { + export type AsObject = { + epoch: number, + userOpHash: string, + error: string, + } +} + +declare class Task$1 extends jspb.Message { + getId(): string; + setId(value: string): Task$1; + getOwner(): string; + setOwner(value: string): Task$1; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task$1; + getStartAt(): number; + setStartAt(value: number): Task$1; + getExpiredAt(): number; + setExpiredAt(value: number): Task$1; + getMemo(): string; + setMemo(value: string): Task$1; + getCompletedAt(): number; + setCompletedAt(value: number): Task$1; + getMaxExecution(): number; + setMaxExecution(value: number): Task$1; + getStatus(): TaskStatus; + setStatus(value: TaskStatus): Task$1; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): Task$1; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge, index?: number): TaskEdge; + clearExecutionsList(): void; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution, index?: number): Execution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Task$1.AsObject; + static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Task$1; + static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; +} + +declare namespace Task$1 { + export type AsObject = { + id: string, + owner: string, + smartWalletAddress: string, + startAt: number, + expiredAt: number, + memo: string, + completedAt: number, + maxExecution: number, + status: TaskStatus, + trigger?: TaskTrigger$1.AsObject, + nodesList: Array, + edgesList: Array, + executionsList: Array, + } +} + +declare class CreateTaskReq extends jspb.Message { + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): CreateTaskReq; + getStartAt(): number; + setStartAt(value: number): CreateTaskReq; + getExpiredAt(): number; + setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; + getMemo(): string; + setMemo(value: string): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge, index?: number): TaskEdge; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskReq.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskReq; + static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; +} + +declare namespace CreateTaskReq { + export type AsObject = { + trigger?: TaskTrigger$1.AsObject, + startAt: number, + expiredAt: number, + maxExecution: number, + smartWalletAddress: string, + memo: string, + nodesList: Array, + edgesList: Array, + } +} + +declare class CreateTaskResp extends jspb.Message { + getId(): string; + setId(value: string): CreateTaskResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskResp; + static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; +} + +declare namespace CreateTaskResp { + export type AsObject = { + id: string, + } +} + +declare class NonceRequest extends jspb.Message { + getOwner(): string; + setOwner(value: string): NonceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceRequest.AsObject; + static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceRequest; + static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; +} + +declare namespace NonceRequest { + export type AsObject = { + owner: string, + } +} + +declare class NonceResp extends jspb.Message { + getNonce(): string; + setNonce(value: string): NonceResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceResp.AsObject; + static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceResp; + static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; +} + +declare namespace NonceResp { + export type AsObject = { + nonce: string, + } +} + +declare class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; +} + +declare namespace ListWalletReq { + export type AsObject = { + factory: string, + salt: string, + } +} + +declare class SmartWallet$1 extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet$1; + getSalt(): string; + setSalt(value: string): SmartWallet$1; + getFactory(): string; + setFactory(value: string): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SmartWallet$1.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet$1; + static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; +} + +declare namespace SmartWallet$1 { + export type AsObject = { + address: string, + salt: string, + factory: string, + } +} + +declare class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +declare namespace ListWalletResp { + export type AsObject = { + walletsList: Array, + } +} + +declare class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksReq; + static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; +} + +declare namespace ListTasksReq { + export type AsObject = { + smartWalletAddress: string, + } +} + +declare class ListTasksResp extends jspb.Message { + clearTasksList(): void; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task$1, index?: number): Task$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksResp; + static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; +} + +declare namespace ListTasksResp { + export type AsObject = { + tasksList: Array, + } +} + +declare class GetKeyReq extends jspb.Message { + getOwner(): string; + setOwner(value: string): GetKeyReq; + getExpiredAt(): number; + setExpiredAt(value: number): GetKeyReq; + getSignature(): string; + setSignature(value: string): GetKeyReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetKeyReq.AsObject; + static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetKeyReq; + static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; +} + +declare namespace GetKeyReq { + export type AsObject = { + owner: string, + expiredAt: number, + signature: string, + } +} + +declare class KeyResp extends jspb.Message { + getKey(): string; + setKey(value: string): KeyResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyResp.AsObject; + static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyResp; + static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; +} + +declare namespace KeyResp { + export type AsObject = { + key: string, + } +} + +declare class UpdateChecksReq extends jspb.Message { + getAddress(): string; + setAddress(value: string): UpdateChecksReq; + getSignature(): string; + setSignature(value: string): UpdateChecksReq; + clearIdList(): void; + getIdList(): Array; + setIdList(value: Array): UpdateChecksReq; + addId(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; + static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; +} + +declare namespace UpdateChecksReq { + export type AsObject = { + address: string, + signature: string, + idList: Array, + } +} + +declare class UpdateChecksResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; + static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; +} + +declare namespace UpdateChecksResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class CreateWalletReq$1 extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq$1; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; + static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; +} + +declare namespace CreateWalletReq$1 { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +declare class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; +} + +declare namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } +} + +declare enum TaskStatus { + ACTIVE = 0, + COMPLETED = 1, + FAILED = 2, + CANCELED = 3, + EXECUTING = 4, +} + +declare enum CustomCodeType { + JAVASCRIPT = 0, +} + +// package: aggregator +// file: avs.proto + + + +interface IAggregatorClient { + getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +declare class AggregatorClient extends grpc.Client implements IAggregatorClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +type Environment = "production" | "development" | "staging"; +declare const AUTH_KEY_HEADER = "authkey"; +interface RequestOptions { + authKey: string; +} +interface GetKeyResponse { + authKey: string; +} +interface ClientOption { + endpoint: string; +} +interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[]; + }; + block?: { + interval: number; + }; +} +interface TaskType { + id: string; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: Array<{ + taskType: number; + id: string; + name: string; + nextList: any[]; + ethTransfer?: any; + contractExecution: any; + graphqlDataQuery?: any; + httpDataQuery?: any; + customCode?: any; + branch?: any; + }>; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + status: number; + maxExecution: number; + executionsList: any[]; +} +interface CreateTaskResponse { + id: string; +} +interface ListTasksResponse { + tasks: { + id: string; + status: string; + }[]; +} +interface CancelTaskResponse { + value: boolean; +} +interface DeleteTaskResponse { + value: boolean; +} +interface SmartWallet { + address: string; + salt: string; + factory: string; +} +interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} + +declare class Task implements TaskType { + id: string; + status: number; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: any[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + maxExecution: number; + executionsList: any[]; + constructor(task: Task$1); +} + +declare class BaseClient { + readonly endpoint: string; + readonly rpcClient: AggregatorClient; + protected metadata: Metadata; + constructor(opts: ClientOption); + isAuthKeyValid(key: string): boolean; + authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; + authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; + protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; + protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; +} +declare class Client extends BaseClient { + constructor(config: ClientOption); + listSmartWallets(options: RequestOptions): Promise; + createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; + createTask(payload: any, options: RequestOptions): Promise; + listTasks(address: string, options: RequestOptions): Promise; + getTask(id: string, options: RequestOptions): Promise; + cancelTask(id: string, options: RequestOptions): Promise; + deleteTask(id: string, options: RequestOptions): Promise; +} + +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..1435a0b --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,1364 @@ +import * as grpc from '@grpc/grpc-js'; +import { Metadata } from '@grpc/grpc-js'; +import * as jspb from 'google-protobuf'; +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; +import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; + +declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; + +// package: aggregator +// file: avs.proto + + + +declare class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; +} + +declare namespace IdReq { + export type AsObject = { + id: string, + } +} + +declare class Checkin extends jspb.Message { + getId(): string; + setId(value: string): Checkin; + getAddress(): string; + setAddress(value: string): Checkin; + getSignature(): string; + setSignature(value: string): Checkin; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): Checkin.Status | undefined; + setStatus(value?: Checkin.Status): Checkin; + getVersion(): string; + setVersion(value: string): Checkin; + getMetricsport(): number; + setMetricsport(value: number): Checkin; + getRemoteip(): string; + setRemoteip(value: string): Checkin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Checkin.AsObject; + static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Checkin; + static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; +} + +declare namespace Checkin { + export type AsObject = { + id: string, + address: string, + signature: string, + status?: Checkin.Status.AsObject, + version: string, + metricsport: number, + remoteip: string, + } + + + export class Status extends jspb.Message { + getUptime(): number; + setUptime(value: number): Status; + getQueuedepth(): number; + setQueuedepth(value: number): Status; + + hasLastHeartbeat(): boolean; + clearLastHeartbeat(): void; + getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; + } + + export namespace Status { + export type AsObject = { + uptime: number, + queuedepth: number, + lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + } + +} + +declare class CheckinResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckinResp.AsObject; + static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckinResp; + static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; +} + +declare namespace CheckinResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class SyncTasksReq extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksReq; + getAddress(): string; + setAddress(value: string): SyncTasksReq; + getSignature(): string; + setSignature(value: string): SyncTasksReq; + getMonotonicClock(): number; + setMonotonicClock(value: number): SyncTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksReq; + static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; +} + +declare namespace SyncTasksReq { + export type AsObject = { + id: string, + address: string, + signature: string, + monotonicClock: number, + } +} + +declare class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} + +declare namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} + +declare class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; +} + +declare namespace CronCondition { + export type AsObject = { + scheduleList: Array, + } +} + +declare class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; +} + +declare namespace BlockCondition { + export type AsObject = { + interval: number, + } +} + +declare class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; +} + +declare namespace EventCondition { + export type AsObject = { + expression: string, + } +} + +declare class TaskTrigger$1 extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger$1; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger$1; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger$1; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger$1; + + getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; + static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; +} + +declare namespace TaskTrigger$1 { + export type AsObject = { + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, + } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + +} + +declare class SyncTasksResp extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksResp; + getChecktype(): string; + setChecktype(value: string): SyncTasksResp; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): SyncTasksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksResp; + static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; +} + +declare namespace SyncTasksResp { + export type AsObject = { + id: string, + checktype: string, + trigger?: TaskTrigger$1.AsObject, + } +} + +declare class ETHTransferNode extends jspb.Message { + getDestination(): string; + setDestination(value: string): ETHTransferNode; + getAmount(): string; + setAmount(value: string): ETHTransferNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; +} + +declare namespace ETHTransferNode { + export type AsObject = { + destination: string, + amount: string, + } +} + +declare class ContractWriteNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractWriteNode; + getCallData(): string; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; +} + +declare namespace ContractWriteNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +declare namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class GraphQLQueryNode extends jspb.Message { + getUrl(): string; + setUrl(value: string): GraphQLQueryNode; + getQuery(): string; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; +} + +declare namespace GraphQLQueryNode { + export type AsObject = { + url: string, + query: string, + + variablesMap: Array<[string, string]>, + } +} + +declare class RestAPINode extends jspb.Message { + getUrl(): string; + setUrl(value: string): RestAPINode; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + getBody(): string; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; +} + +declare namespace RestAPINode { + export type AsObject = { + url: string, + + headersMap: Array<[string, string]>, + body: string, + method: string, + } +} + +declare class CustomCodeNode extends jspb.Message { + getType(): CustomCodeType; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; +} + +declare namespace CustomCodeNode { + export type AsObject = { + type: CustomCodeType, + source: string, + } +} + +declare class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; + getExpression(): string; + setExpression(value: string): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; +} + +declare namespace Condition { + export type AsObject = { + id: string, + type: string, + expression: string, + } +} + +declare class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +declare namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} + +declare class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; +} + +declare namespace FilterNode { + export type AsObject = { + expression: string, + } +} + +declare class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +declare namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + +declare class TaskEdge extends jspb.Message { + getId(): string; + setId(value: string): TaskEdge; + getSource(): string; + setSource(value: string): TaskEdge; + getTarget(): string; + setTarget(value: string): TaskEdge; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge): TaskEdge.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge; + static deserializeBinaryFromReader(message: TaskEdge, reader: jspb.BinaryReader): TaskEdge; +} + +declare namespace TaskEdge { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +declare class TaskNode extends jspb.Message { + getId(): string; + setId(value: string): TaskNode; + getName(): string; + setName(value: string): TaskNode; + + hasEthTransfer(): boolean; + clearEthTransfer(): void; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode; + + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode; + + hasGraphqlDataQuery(): boolean; + clearGraphqlDataQuery(): void; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode; + + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode; + + hasCustomCode(): boolean; + clearCustomCode(): void; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode; + + getTaskTypeCase(): TaskNode.TaskTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskNode.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode): TaskNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode; + static deserializeBinaryFromReader(message: TaskNode, reader: jspb.BinaryReader): TaskNode; +} + +declare namespace TaskNode { + export type AsObject = { + id: string, + name: string, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, + } + + export enum TaskTypeCase { + TASK_TYPE_NOT_SET = 0, + ETH_TRANSFER = 10, + CONTRACT_WRITE = 11, + CONTRACT_READ = 12, + GRAPHQL_DATA_QUERY = 13, + REST_API = 14, + BRANCH = 15, + FILTER = 16, + LOOP = 17, + CUSTOM_CODE = 18, + } + +} + +declare class Execution extends jspb.Message { + getEpoch(): number; + setEpoch(value: number): Execution; + getUserOpHash(): string; + setUserOpHash(value: string): Execution; + getError(): string; + setError(value: string): Execution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Execution.AsObject; + static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution; + static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; +} + +declare namespace Execution { + export type AsObject = { + epoch: number, + userOpHash: string, + error: string, + } +} + +declare class Task$1 extends jspb.Message { + getId(): string; + setId(value: string): Task$1; + getOwner(): string; + setOwner(value: string): Task$1; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task$1; + getStartAt(): number; + setStartAt(value: number): Task$1; + getExpiredAt(): number; + setExpiredAt(value: number): Task$1; + getMemo(): string; + setMemo(value: string): Task$1; + getCompletedAt(): number; + setCompletedAt(value: number): Task$1; + getMaxExecution(): number; + setMaxExecution(value: number): Task$1; + getStatus(): TaskStatus; + setStatus(value: TaskStatus): Task$1; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): Task$1; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge, index?: number): TaskEdge; + clearExecutionsList(): void; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution, index?: number): Execution; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Task$1.AsObject; + static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Task$1; + static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; +} + +declare namespace Task$1 { + export type AsObject = { + id: string, + owner: string, + smartWalletAddress: string, + startAt: number, + expiredAt: number, + memo: string, + completedAt: number, + maxExecution: number, + status: TaskStatus, + trigger?: TaskTrigger$1.AsObject, + nodesList: Array, + edgesList: Array, + executionsList: Array, + } +} + +declare class CreateTaskReq extends jspb.Message { + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): CreateTaskReq; + getStartAt(): number; + setStartAt(value: number): CreateTaskReq; + getExpiredAt(): number; + setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; + getMemo(): string; + setMemo(value: string): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge, index?: number): TaskEdge; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskReq.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskReq; + static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; +} + +declare namespace CreateTaskReq { + export type AsObject = { + trigger?: TaskTrigger$1.AsObject, + startAt: number, + expiredAt: number, + maxExecution: number, + smartWalletAddress: string, + memo: string, + nodesList: Array, + edgesList: Array, + } +} + +declare class CreateTaskResp extends jspb.Message { + getId(): string; + setId(value: string): CreateTaskResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskResp; + static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; +} + +declare namespace CreateTaskResp { + export type AsObject = { + id: string, + } +} + +declare class NonceRequest extends jspb.Message { + getOwner(): string; + setOwner(value: string): NonceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceRequest.AsObject; + static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceRequest; + static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; +} + +declare namespace NonceRequest { + export type AsObject = { + owner: string, + } +} + +declare class NonceResp extends jspb.Message { + getNonce(): string; + setNonce(value: string): NonceResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceResp.AsObject; + static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceResp; + static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; +} + +declare namespace NonceResp { + export type AsObject = { + nonce: string, + } +} + +declare class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; +} + +declare namespace ListWalletReq { + export type AsObject = { + factory: string, + salt: string, + } +} + +declare class SmartWallet$1 extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet$1; + getSalt(): string; + setSalt(value: string): SmartWallet$1; + getFactory(): string; + setFactory(value: string): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SmartWallet$1.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet$1; + static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; +} + +declare namespace SmartWallet$1 { + export type AsObject = { + address: string, + salt: string, + factory: string, + } +} + +declare class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +declare namespace ListWalletResp { + export type AsObject = { + walletsList: Array, + } +} + +declare class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksReq; + static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; +} + +declare namespace ListTasksReq { + export type AsObject = { + smartWalletAddress: string, + } +} + +declare class ListTasksResp extends jspb.Message { + clearTasksList(): void; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task$1, index?: number): Task$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksResp; + static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; +} + +declare namespace ListTasksResp { + export type AsObject = { + tasksList: Array, + } +} + +declare class GetKeyReq extends jspb.Message { + getOwner(): string; + setOwner(value: string): GetKeyReq; + getExpiredAt(): number; + setExpiredAt(value: number): GetKeyReq; + getSignature(): string; + setSignature(value: string): GetKeyReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetKeyReq.AsObject; + static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetKeyReq; + static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; +} + +declare namespace GetKeyReq { + export type AsObject = { + owner: string, + expiredAt: number, + signature: string, + } +} + +declare class KeyResp extends jspb.Message { + getKey(): string; + setKey(value: string): KeyResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyResp.AsObject; + static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyResp; + static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; +} + +declare namespace KeyResp { + export type AsObject = { + key: string, + } +} + +declare class UpdateChecksReq extends jspb.Message { + getAddress(): string; + setAddress(value: string): UpdateChecksReq; + getSignature(): string; + setSignature(value: string): UpdateChecksReq; + clearIdList(): void; + getIdList(): Array; + setIdList(value: Array): UpdateChecksReq; + addId(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; + static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; +} + +declare namespace UpdateChecksReq { + export type AsObject = { + address: string, + signature: string, + idList: Array, + } +} + +declare class UpdateChecksResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; + static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; +} + +declare namespace UpdateChecksResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class CreateWalletReq$1 extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq$1; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; + static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; +} + +declare namespace CreateWalletReq$1 { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +declare class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; +} + +declare namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } +} + +declare enum TaskStatus { + ACTIVE = 0, + COMPLETED = 1, + FAILED = 2, + CANCELED = 3, + EXECUTING = 4, +} + +declare enum CustomCodeType { + JAVASCRIPT = 0, +} + +// package: aggregator +// file: avs.proto + + + +interface IAggregatorClient { + getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +declare class AggregatorClient extends grpc.Client implements IAggregatorClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +type Environment = "production" | "development" | "staging"; +declare const AUTH_KEY_HEADER = "authkey"; +interface RequestOptions { + authKey: string; +} +interface GetKeyResponse { + authKey: string; +} +interface ClientOption { + endpoint: string; +} +interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[]; + }; + block?: { + interval: number; + }; +} +interface TaskType { + id: string; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: Array<{ + taskType: number; + id: string; + name: string; + nextList: any[]; + ethTransfer?: any; + contractExecution: any; + graphqlDataQuery?: any; + httpDataQuery?: any; + customCode?: any; + branch?: any; + }>; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + status: number; + maxExecution: number; + executionsList: any[]; +} +interface CreateTaskResponse { + id: string; +} +interface ListTasksResponse { + tasks: { + id: string; + status: string; + }[]; +} +interface CancelTaskResponse { + value: boolean; +} +interface DeleteTaskResponse { + value: boolean; +} +interface SmartWallet { + address: string; + salt: string; + factory: string; +} +interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} + +declare class Task implements TaskType { + id: string; + status: number; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: any[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + maxExecution: number; + executionsList: any[]; + constructor(task: Task$1); +} + +declare class BaseClient { + readonly endpoint: string; + readonly rpcClient: AggregatorClient; + protected metadata: Metadata; + constructor(opts: ClientOption); + isAuthKeyValid(key: string): boolean; + authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; + authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; + protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; + protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; +} +declare class Client extends BaseClient { + constructor(config: ClientOption); + listSmartWallets(options: RequestOptions): Promise; + createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; + createTask(payload: any, options: RequestOptions): Promise; + listTasks(address: string, options: RequestOptions): Promise; + getTask(id: string, options: RequestOptions): Promise; + cancelTask(id: string, options: RequestOptions): Promise; + deleteTask(id: string, options: RequestOptions): Promise; +} + +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.js b/dist/index.js index 2a05521..642fbcc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -55,15 +55,13 @@ var require_avs_pb = __commonJS({ goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); goog.object.extend(proto, google_protobuf_wrappers_pb); - goog.exportSymbol("proto.aggregator.AddressRequest", null, global); - goog.exportSymbol("proto.aggregator.AddressResp", null, global); goog.exportSymbol("proto.aggregator.BlockCondition", null, global); goog.exportSymbol("proto.aggregator.BranchNode", null, global); goog.exportSymbol("proto.aggregator.Checkin", null, global); goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); goog.exportSymbol("proto.aggregator.CheckinResp", null, global); - goog.exportSymbol("proto.aggregator.ConditionJump", null, global); - goog.exportSymbol("proto.aggregator.ContractQueryNode", null, global); + goog.exportSymbol("proto.aggregator.Condition", null, global); + goog.exportSymbol("proto.aggregator.ContractReadNode", null, global); goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); @@ -80,9 +78,13 @@ var require_avs_pb = __commonJS({ goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); + goog.exportSymbol("proto.aggregator.IdReq", null, global); goog.exportSymbol("proto.aggregator.KeyResp", null, global); goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); + goog.exportSymbol("proto.aggregator.ListWalletReq", null, global); + goog.exportSymbol("proto.aggregator.ListWalletResp", null, global); + goog.exportSymbol("proto.aggregator.LoopNode", null, global); goog.exportSymbol("proto.aggregator.NonceRequest", null, global); goog.exportSymbol("proto.aggregator.NonceResp", null, global); goog.exportSymbol("proto.aggregator.RestAPINode", null, global); @@ -92,21 +94,18 @@ var require_avs_pb = __commonJS({ goog.exportSymbol("proto.aggregator.Task", null, global); goog.exportSymbol("proto.aggregator.TaskEdge", null, global); goog.exportSymbol("proto.aggregator.TaskNode", null, global); - goog.exportSymbol("proto.aggregator.TaskNode.TaskBodyCase", null, global); + goog.exportSymbol("proto.aggregator.TaskNode.TaskTypeCase", null, global); goog.exportSymbol("proto.aggregator.TaskStatus", null, global); goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerConditionCase", null, global); - goog.exportSymbol("proto.aggregator.TaskType", null, global); - goog.exportSymbol("proto.aggregator.TriggerType", null, global); - goog.exportSymbol("proto.aggregator.UUID", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global); goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); - proto.aggregator.UUID = function(opt_data) { + proto.aggregator.IdReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.UUID, jspb.Message); + goog.inherits(proto.aggregator.IdReq, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; + proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; } proto.aggregator.Checkin = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -192,12 +191,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; } - proto.aggregator.ContractQueryNode = function(opt_data) { + proto.aggregator.ContractReadNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); + goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractQueryNode.displayName = "proto.aggregator.ContractQueryNode"; + proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; } proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -220,12 +219,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; } - proto.aggregator.ConditionJump = function(opt_data) { + proto.aggregator.Condition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ConditionJump, jspb.Message); + goog.inherits(proto.aggregator.Condition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; + proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; } proto.aggregator.BranchNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); @@ -241,6 +240,13 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; } + proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.LoopNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; + } proto.aggregator.TaskEdge = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; @@ -297,12 +303,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; } - proto.aggregator.AddressRequest = function(opt_data) { + proto.aggregator.ListWalletReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.AddressRequest, jspb.Message); + goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; + proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; } proto.aggregator.SmartWallet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -311,12 +317,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; } - proto.aggregator.AddressResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); + proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); }; - goog.inherits(proto.aggregator.AddressResp, jspb.Message); + goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; + proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; } proto.aggregator.ListTasksReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -375,12 +381,12 @@ var require_avs_pb = __commonJS({ proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; } if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); + proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.toObject(opt_includeInstance, this); }; - proto.aggregator.UUID.toObject = function(includeInstance, msg) { + proto.aggregator.IdReq.toObject = function(includeInstance, msg) { var f, obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -388,12 +394,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.UUID.deserializeBinary = function(bytes) { + proto.aggregator.IdReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID(); - return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.IdReq(); + return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -405,7 +411,7 @@ var require_avs_pb = __commonJS({ /** @type {string} */ reader.readString() ); - msg.setBytes(value); + msg.setId(value); break; default: reader.skipField(); @@ -414,14 +420,14 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.UUID.prototype.serializeBinary = function() { + proto.aggregator.IdReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UUID.serializeBinaryToWriter(this, writer); + proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getBytes(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -429,13 +435,13 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.UUID.prototype.getBytes = function() { + proto.aggregator.IdReq.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UUID.prototype.setBytes = function(value) { + proto.aggregator.IdReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -980,7 +986,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { var f, obj = { - epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1006,7 +1012,7 @@ var require_avs_pb = __commonJS({ reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] ); for (var i = 0; i < values.length; i++) { - msg.addEpoches(values[i]); + msg.addEpochs(values[i]); } break; default: @@ -1023,7 +1029,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getEpochesList(); + f = message.getEpochsList(); if (f.length > 0) { writer.writePackedInt64( 1, @@ -1031,20 +1037,20 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { + proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { return ( /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { + proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { + proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { - return this.setEpochesList([]); + proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; proto.aggregator.CronCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1053,7 +1059,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1078,7 +1084,7 @@ var require_avs_pb = __commonJS({ /** @type {string} */ reader.readString() ); - msg.addCronTable(value); + msg.addSchedule(value); break; default: reader.skipField(); @@ -1094,7 +1100,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getCronTableList(); + f = message.getScheduleList(); if (f.length > 0) { writer.writeRepeatedString( 1, @@ -1102,20 +1108,20 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.CronCondition.prototype.getCronTableList = function() { + proto.aggregator.CronCondition.prototype.getScheduleList = function() { return ( /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { + proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_index) { + proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.CronCondition.prototype.clearCronTableList = function() { - return this.setCronTableList([]); + proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { @@ -1245,18 +1251,18 @@ var require_avs_pb = __commonJS({ proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]]; - proto.aggregator.TaskTrigger.TriggerConditionCase = { - TRIGGER_CONDITION_NOT_SET: 0, - MANUAL: 2, - AT: 3, - CRON: 4, - BLOCK: 5, - EVENT: 6 + proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; + proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 }; - proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { + proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { return ( - /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */ + /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */ jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) ); }; @@ -1266,9 +1272,8 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) @@ -1292,35 +1297,28 @@ var require_avs_pb = __commonJS({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = ( - /** @type {!proto.aggregator.TriggerType} */ - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: var value = ( /** @type {boolean} */ reader.readBool() ); msg.setManual(value); break; - case 3: + case 2: var value = new proto.aggregator.FixedEpochCondition(); reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); - msg.setAt(value); + msg.setFixedTime(value); break; - case 4: + case 3: var value = new proto.aggregator.CronCondition(); reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); msg.setCron(value); break; - case 5: + case 4: var value = new proto.aggregator.BlockCondition(); reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); msg.setBlock(value); break; - case 6: + case 5: var value = new proto.aggregator.EventCondition(); reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); msg.setEvent(value); @@ -1339,25 +1337,18 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } f = /** @type {boolean} */ - jspb.Message.getField(message, 2); + jspb.Message.getField(message, 1); if (f != null) { writer.writeBool( - 2, + 1, f ); } - f = message.getAt(); + f = message.getFixedTime(); if (f != null) { writer.writeMessage( - 3, + 2, f, proto.aggregator.FixedEpochCondition.serializeBinaryToWriter ); @@ -1365,7 +1356,7 @@ var require_avs_pb = __commonJS({ f = message.getCron(); if (f != null) { writer.writeMessage( - 4, + 3, f, proto.aggregator.CronCondition.serializeBinaryToWriter ); @@ -1373,7 +1364,7 @@ var require_avs_pb = __commonJS({ f = message.getBlock(); if (f != null) { writer.writeMessage( - 5, + 4, f, proto.aggregator.BlockCondition.serializeBinaryToWriter ); @@ -1381,95 +1372,86 @@ var require_avs_pb = __commonJS({ f = message.getEvent(); if (f != null) { writer.writeMessage( - 6, + 5, f, proto.aggregator.EventCondition.serializeBinaryToWriter ); } }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; proto.aggregator.TaskTrigger.prototype.getManual = function() { return ( /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 2, false) + jspb.Message.getBooleanFieldWithDefault(this, 1, false) ); }; proto.aggregator.TaskTrigger.prototype.setManual = function(value) { - return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearManual = function() { - return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); }; proto.aggregator.TaskTrigger.prototype.hasManual = function() { - return jspb.Message.getField(this, 2) != null; + return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.TaskTrigger.prototype.getAt = function() { + proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { return ( /** @type{?proto.aggregator.FixedEpochCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3) + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) ); }; - proto.aggregator.TaskTrigger.prototype.setAt = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; - proto.aggregator.TaskTrigger.prototype.clearAt = function() { - return this.setAt(void 0); + proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(void 0); }; - proto.aggregator.TaskTrigger.prototype.hasAt = function() { - return jspb.Message.getField(this, 3) != null; + proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; }; proto.aggregator.TaskTrigger.prototype.getCron = function() { return ( /** @type{?proto.aggregator.CronCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4) + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) ); }; proto.aggregator.TaskTrigger.prototype.setCron = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearCron = function() { return this.setCron(void 0); }; proto.aggregator.TaskTrigger.prototype.hasCron = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 3) != null; }; proto.aggregator.TaskTrigger.prototype.getBlock = function() { return ( /** @type{?proto.aggregator.BlockCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5) + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) ); }; proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearBlock = function() { return this.setBlock(void 0); }; proto.aggregator.TaskTrigger.prototype.hasBlock = function() { - return jspb.Message.getField(this, 5) != null; + return jspb.Message.getField(this, 4) != null; }; proto.aggregator.TaskTrigger.prototype.getEvent = function() { return ( /** @type{?proto.aggregator.EventCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6) + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) ); }; proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearEvent = function() { return this.setEvent(void 0); }; proto.aggregator.TaskTrigger.prototype.hasEvent = function() { - return jspb.Message.getField(this, 6) != null; + return jspb.Message.getField(this, 5) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { @@ -1789,10 +1771,10 @@ var require_avs_pb = __commonJS({ return jspb.Message.setProto3StringField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); + proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { + proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), callData: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -1804,12 +1786,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.ContractQueryNode.deserializeBinary = function(bytes) { + proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryNode(); - return proto.aggregator.ContractQueryNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractReadNode(); + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1844,12 +1826,12 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { + proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getContractAddress(); if (f.length > 0) { @@ -1873,31 +1855,31 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { + proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { + proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ContractQueryNode.prototype.getCallData = function() { + proto.aggregator.ContractReadNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { + proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { + proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { + proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1907,7 +1889,8 @@ var require_avs_pb = __commonJS({ proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1941,6 +1924,12 @@ var require_avs_pb = __commonJS({ ); msg.setQuery(value); break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; default: reader.skipField(); break; @@ -1969,6 +1958,10 @@ var require_avs_pb = __commonJS({ f ); } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } }; proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return ( @@ -1988,6 +1981,21 @@ var require_avs_pb = __commonJS({ proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 3, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this; + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); @@ -2215,13 +2223,14 @@ var require_avs_pb = __commonJS({ return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); + proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); }; - proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { + proto.aggregator.Condition.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2229,12 +2238,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { + proto.aggregator.Condition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.Condition(); + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2246,14 +2255,21 @@ var require_avs_pb = __commonJS({ /** @type {string} */ reader.readString() ); - msg.setExpression(value); + msg.setId(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setNext(value); + msg.setType(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); break; default: reader.skipField(); @@ -2262,60 +2278,74 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.ConditionJump.prototype.serializeBinary = function() { + proto.aggregator.Condition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getExpression(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getNext(); + f = message.getType(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; - proto.aggregator.ConditionJump.prototype.getExpression = function() { + proto.aggregator.Condition.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ConditionJump.prototype.setExpression = function(value) { + proto.aggregator.Condition.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ConditionJump.prototype.getNext = function() { + proto.aggregator.Condition.prototype.getType = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ConditionJump.prototype.setNext = function(value) { + proto.aggregator.Condition.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchNode.repeatedFields_ = [2]; + proto.aggregator.Condition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.BranchNode.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList( - msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, + conditionsList: jspb.Message.toObjectList( + msg.getConditionsList(), + proto.aggregator.Condition.toObject, includeInstance - ), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2336,19 +2366,9 @@ var require_avs_pb = __commonJS({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); + var value = new proto.aggregator.Condition(); + reader.readMessage(value, proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); break; default: reader.skipField(); @@ -2364,75 +2384,29 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getIf(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElseifsList(); + f = message.getConditionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, + 1, f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + proto.aggregator.Condition.serializeBinaryToWriter ); } }; - proto.aggregator.BranchNode.prototype.getIf = function() { + proto.aggregator.BranchNode.prototype.getConditionsList = function() { return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) ); }; - proto.aggregator.BranchNode.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.BranchNode.prototype.clearIf = function() { - return this.setIf(void 0); - }; - proto.aggregator.BranchNode.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.BranchNode.prototype.getElseifsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2) - ); - }; - proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); - }; - proto.aggregator.BranchNode.prototype.clearElseifsList = function() { - return this.setElseifsList([]); - }; - proto.aggregator.BranchNode.prototype.getElse = function() { - return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) - ); - }; - proto.aggregator.BranchNode.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; - proto.aggregator.BranchNode.prototype.clearElse = function() { - return this.setElse(void 0); + proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); }; - proto.aggregator.BranchNode.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; + proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { @@ -2498,6 +2472,94 @@ var require_avs_pb = __commonJS({ proto.aggregator.FilterNode.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode(); + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterVar(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.LoopNode.prototype.getIterVar = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.LoopNode.prototype.getIterKey = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); @@ -2610,9 +2672,9 @@ var require_avs_pb = __commonJS({ proto.aggregator.TaskEdge.prototype.setTarget = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17]]; - proto.aggregator.TaskNode.TaskBodyCase = { - TASK_BODY_NOT_SET: 0, + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; + proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, ETH_TRANSFER: 10, CONTRACT_WRITE: 11, CONTRACT_READ: 12, @@ -2620,11 +2682,12 @@ var require_avs_pb = __commonJS({ REST_API: 14, BRANCH: 15, FILTER: 16, - CUSTOM_CODE: 17 + LOOP: 17, + CUSTOM_CODE: 18 }; - proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { + proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { return ( - /** @type {proto.aggregator.TaskNode.TaskBodyCase} */ + /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) ); }; @@ -2634,16 +2697,16 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { var f, obj = { - nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 3, ""), ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), - contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractQueryNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) }; if (includeInstance) { @@ -2664,13 +2727,6 @@ var require_avs_pb = __commonJS({ } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TaskType} */ - reader.readEnum() - ); - msg.setNodeType(value); - break; case 2: var value = ( /** @type {string} */ @@ -2696,8 +2752,8 @@ var require_avs_pb = __commonJS({ msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.ContractQueryNode(); - reader.readMessage(value, proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + var value = new proto.aggregator.ContractReadNode(); + reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); msg.setContractRead(value); break; case 13: @@ -2721,6 +2777,11 @@ var require_avs_pb = __commonJS({ msg.setFilter(value); break; case 17: + var value = new proto.aggregator.LoopNode(); + reader.readMessage(value, proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: var value = new proto.aggregator.CustomCodeNode(); reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); msg.setCustomCode(value); @@ -2739,13 +2800,6 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getNodeType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } f = message.getId(); if (f.length > 0) { writer.writeString( @@ -2781,7 +2835,7 @@ var require_avs_pb = __commonJS({ writer.writeMessage( 12, f, - proto.aggregator.ContractQueryNode.serializeBinaryToWriter + proto.aggregator.ContractReadNode.serializeBinaryToWriter ); } f = message.getGraphqlDataQuery(); @@ -2816,24 +2870,23 @@ var require_avs_pb = __commonJS({ proto.aggregator.FilterNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getLoop(); if (f != null) { writer.writeMessage( 17, f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, proto.aggregator.CustomCodeNode.serializeBinaryToWriter ); } }; - proto.aggregator.TaskNode.prototype.getNodeType = function() { - return ( - /** @type {!proto.aggregator.TaskType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskNode.prototype.setNodeType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; proto.aggregator.TaskNode.prototype.getId = function() { return ( /** @type {string} */ @@ -2884,8 +2937,8 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskNode.prototype.getContractRead = function() { return ( - /** @type{?proto.aggregator.ContractQueryNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12) + /** @type{?proto.aggregator.ContractReadNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) ); }; proto.aggregator.TaskNode.prototype.setContractRead = function(value) { @@ -2957,20 +3010,35 @@ var require_avs_pb = __commonJS({ proto.aggregator.TaskNode.prototype.hasFilter = function() { return jspb.Message.getField(this, 16) != null; }; + proto.aggregator.TaskNode.prototype.getLoop = function() { + return ( + /** @type{?proto.aggregator.LoopNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(void 0); + }; + proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; + }; proto.aggregator.TaskNode.prototype.getCustomCode = function() { return ( /** @type{?proto.aggregator.CustomCodeNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17) + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) ); }; proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); }; proto.aggregator.TaskNode.prototype.clearCustomCode = function() { return this.setCustomCode(void 0); }; proto.aggregator.TaskNode.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 17) != null; + return jspb.Message.getField(this, 18) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { @@ -3091,14 +3159,14 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.Task.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), + id: jspb.Message.getFieldWithDefault(msg, 1, ""), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - memo: jspb.Message.getFieldWithDefault(msg, 7, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), - recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), status: jspb.Message.getFieldWithDefault(msg, 9, 0), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), nodesList: jspb.Message.toObjectList( @@ -3136,8 +3204,10 @@ var require_avs_pb = __commonJS({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.UUID(); - reader.readMessage(value, proto.aggregator.UUID.deserializeBinaryFromReader); + var value = ( + /** @type {string} */ + reader.readString() + ); msg.setId(value); break; case 2: @@ -3154,40 +3224,40 @@ var require_avs_pb = __commonJS({ ); msg.setSmartWalletAddress(value); break; - case 5: + case 4: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 6: + case 5: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; - case 7: + case 6: var value = ( /** @type {string} */ reader.readString() ); msg.setMemo(value); break; - case 8: + case 7: var value = ( /** @type {number} */ reader.readInt64() ); msg.setCompletedAt(value); break; - case 10: + case 8: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {number} */ + reader.readInt64() ); - msg.setRecurring(value); + msg.setMaxExecution(value); break; case 9: var value = ( @@ -3196,7 +3266,7 @@ var require_avs_pb = __commonJS({ ); msg.setStatus(value); break; - case 4: + case 10: var value = new proto.aggregator.TaskTrigger(); reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); @@ -3231,11 +3301,10 @@ var require_avs_pb = __commonJS({ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getId(); - if (f != null) { - writer.writeMessage( + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.UUID.serializeBinaryToWriter + f ); } f = message.getOwner(); @@ -3255,35 +3324,35 @@ var require_avs_pb = __commonJS({ f = message.getStartAt(); if (f !== 0) { writer.writeInt64( - 5, + 4, f ); } f = message.getExpiredAt(); if (f !== 0) { writer.writeInt64( - 6, + 5, f ); } f = message.getMemo(); if (f.length > 0) { writer.writeString( - 7, + 6, f ); } f = message.getCompletedAt(); if (f !== 0) { writer.writeInt64( - 8, + 7, f ); } - f = message.getRecurring(); - if (f) { - writer.writeBool( - 10, + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, f ); } @@ -3297,7 +3366,7 @@ var require_avs_pb = __commonJS({ f = message.getTrigger(); if (f != null) { writer.writeMessage( - 4, + 10, f, proto.aggregator.TaskTrigger.serializeBinaryToWriter ); @@ -3329,18 +3398,12 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.Task.prototype.getId = function() { return ( - /** @type{?proto.aggregator.UUID} */ - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.Task.prototype.clearId = function() { - return this.setId(void 0); - }; - proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; + return jspb.Message.setProto3StringField(this, 1, value); }; proto.aggregator.Task.prototype.getOwner = function() { return ( @@ -3363,47 +3426,47 @@ var require_avs_pb = __commonJS({ proto.aggregator.Task.prototype.getStartAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 5, 0) + jspb.Message.getFieldWithDefault(this, 4, 0) ); }; proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 4, value); }; proto.aggregator.Task.prototype.getExpiredAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) + jspb.Message.getFieldWithDefault(this, 5, 0) ); }; proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 5, value); }; proto.aggregator.Task.prototype.getMemo = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 7, "") + jspb.Message.getFieldWithDefault(this, 6, "") ); }; proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 6, value); }; proto.aggregator.Task.prototype.getCompletedAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 8, 0) + jspb.Message.getFieldWithDefault(this, 7, 0) ); }; proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 7, value); }; - proto.aggregator.Task.prototype.getRecurring = function() { + proto.aggregator.Task.prototype.getMaxExecution = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 10, false) + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 8, 0) ); }; - proto.aggregator.Task.prototype.setRecurring = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); + proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; proto.aggregator.Task.prototype.getStatus = function() { return ( @@ -3417,17 +3480,17 @@ var require_avs_pb = __commonJS({ proto.aggregator.Task.prototype.getTrigger = function() { return ( /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) ); }; proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 10, value); }; proto.aggregator.Task.prototype.clearTrigger = function() { return this.setTrigger(void 0); }; proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 10) != null; }; proto.aggregator.Task.prototype.getNodesList = function() { return ( @@ -3484,7 +3547,7 @@ var require_avs_pb = __commonJS({ trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), memo: jspb.Message.getFieldWithDefault(msg, 6, ""), nodesList: jspb.Message.toObjectList( @@ -3537,10 +3600,10 @@ var require_avs_pb = __commonJS({ break; case 4: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {number} */ + reader.readInt64() ); - msg.setRepeatable(value); + msg.setMaxExecution(value); break; case 5: var value = ( @@ -3602,9 +3665,9 @@ var require_avs_pb = __commonJS({ f ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool( + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( 4, f ); @@ -3673,14 +3736,14 @@ var require_avs_pb = __commonJS({ proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 4, false) + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); + proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { return ( @@ -3923,10 +3986,10 @@ var require_avs_pb = __commonJS({ return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); + proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { + proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { var f, obj = { factory: jspb.Message.getFieldWithDefault(msg, 1, ""), salt: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -3937,12 +4000,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { + proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletReq(); + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3970,12 +4033,12 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.AddressRequest.prototype.serializeBinary = function() { + proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getFactory(); if (f.length > 0) { @@ -3992,22 +4055,22 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.AddressRequest.prototype.getFactory = function() { + proto.aggregator.ListWalletReq.prototype.getFactory = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressRequest.prototype.setFactory = function(value) { + proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.AddressRequest.prototype.getSalt = function() { + proto.aggregator.ListWalletReq.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.AddressRequest.prototype.setSalt = function(value) { + proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4122,12 +4185,12 @@ var require_avs_pb = __commonJS({ proto.aggregator.SmartWallet.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.AddressResp.repeatedFields_ = [1]; + proto.aggregator.ListWalletResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); + proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { var f, obj = { walletsList: jspb.Message.toObjectList( msg.getWalletsList(), @@ -4141,12 +4204,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { + proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletResp(); + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4165,12 +4228,12 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { + proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getWalletsList(); if (f.length > 0) { @@ -4181,19 +4244,19 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.AddressResp.prototype.getWalletsList = function() { + proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { return ( /** @type{!Array} */ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) ); }; - proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { + proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; - proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { + proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); }; - proto.aggregator.AddressResp.prototype.clearWalletsList = function() { + proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { return this.setWalletsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4792,7 +4855,9 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -4819,6 +4884,20 @@ var require_avs_pb = __commonJS({ ); msg.setAddress(value); break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; default: reader.skipField(); break; @@ -4840,6 +4919,20 @@ var require_avs_pb = __commonJS({ f ); } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; proto.aggregator.CreateWalletResp.prototype.getAddress = function() { return ( @@ -4850,12 +4943,23 @@ var require_avs_pb = __commonJS({ proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.TriggerType = { - MANUALTRIGGER: 0, - FIXEDEPOCHTRIGGER: 1, - CRONTRIGGER: 2, - BLOCKTRIGGER: 3, - EVENTTRIGGER: 4 + proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; proto.aggregator.Error = { UNKNOWERROR: 0, @@ -4877,16 +4981,6 @@ var require_avs_pb = __commonJS({ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTWRITETASK: 1, - CONTRACTREADTASK: 2, - GRAPHQLDATAQUERYTASK: 3, - RESTAPITASK: 4, - BRANCHTASK: 5, - FILTERTASK: 6, - CUSTOMCODETASK: 7 - }; goog.object.extend(exports2, proto.aggregator); } }); @@ -4896,188 +4990,188 @@ var require_avs_grpc_pb = __commonJS({ "grpc_codegen/avs_grpc_pb.js"(exports2) { "use strict"; var grpc2 = require("@grpc/grpc-js"); - var avs_pb2 = require_avs_pb(); + var avs_pb3 = require_avs_pb(); var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); - function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb2.AddressRequest)) { - throw new Error("Expected argument of type aggregator.AddressRequest"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb2.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb2.AddressResp)) { - throw new Error("Expected argument of type aggregator.AddressResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb2.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); - } function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb2.Checkin)) { + if (!(arg instanceof avs_pb3.Checkin)) { throw new Error("Expected argument of type aggregator.Checkin"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb2.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb2.CheckinResp)) { + if (!(arg instanceof avs_pb3.CheckinResp)) { throw new Error("Expected argument of type aggregator.CheckinResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb2.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb2.CreateTaskReq)) { + if (!(arg instanceof avs_pb3.CreateTaskReq)) { throw new Error("Expected argument of type aggregator.CreateTaskReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb2.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb2.CreateTaskResp)) { + if (!(arg instanceof avs_pb3.CreateTaskResp)) { throw new Error("Expected argument of type aggregator.CreateTaskResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb2.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateWalletReq(arg) { - if (!(arg instanceof avs_pb2.CreateWalletReq)) { + if (!(arg instanceof avs_pb3.CreateWalletReq)) { throw new Error("Expected argument of type aggregator.CreateWalletReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateWalletReq(buffer_arg) { - return avs_pb2.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateWalletResp(arg) { - if (!(arg instanceof avs_pb2.CreateWalletResp)) { + if (!(arg instanceof avs_pb3.CreateWalletResp)) { throw new Error("Expected argument of type aggregator.CreateWalletResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateWalletResp(buffer_arg) { - return avs_pb2.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb2.GetKeyReq)) { + if (!(arg instanceof avs_pb3.GetKeyReq)) { throw new Error("Expected argument of type aggregator.GetKeyReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb2.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb3.IdReq)) { + throw new Error("Expected argument of type aggregator.IdReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb2.KeyResp)) { + if (!(arg instanceof avs_pb3.KeyResp)) { throw new Error("Expected argument of type aggregator.KeyResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb2.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb2.ListTasksReq)) { + if (!(arg instanceof avs_pb3.ListTasksReq)) { throw new Error("Expected argument of type aggregator.ListTasksReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb2.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb2.ListTasksResp)) { + if (!(arg instanceof avs_pb3.ListTasksResp)) { throw new Error("Expected argument of type aggregator.ListTasksResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb2.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb3.ListWalletReq)) { + throw new Error("Expected argument of type aggregator.ListWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb3.ListWalletResp)) { + throw new Error("Expected argument of type aggregator.ListWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb2.NonceRequest)) { + if (!(arg instanceof avs_pb3.NonceRequest)) { throw new Error("Expected argument of type aggregator.NonceRequest"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb2.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb2.NonceResp)) { + if (!(arg instanceof avs_pb3.NonceResp)) { throw new Error("Expected argument of type aggregator.NonceResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb2.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb2.SyncTasksReq)) { + if (!(arg instanceof avs_pb3.SyncTasksReq)) { throw new Error("Expected argument of type aggregator.SyncTasksReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb2.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb2.SyncTasksResp)) { + if (!(arg instanceof avs_pb3.SyncTasksResp)) { throw new Error("Expected argument of type aggregator.SyncTasksResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb2.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb2.Task)) { + if (!(arg instanceof avs_pb3.Task)) { throw new Error("Expected argument of type aggregator.Task"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_Task(buffer_arg) { - return avs_pb2.Task.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb2.UUID)) { - throw new Error("Expected argument of type aggregator.UUID"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb2.UUID.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb2.UpdateChecksReq)) { + if (!(arg instanceof avs_pb3.UpdateChecksReq)) { throw new Error("Expected argument of type aggregator.UpdateChecksReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb2.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb2.UpdateChecksResp)) { + if (!(arg instanceof avs_pb3.UpdateChecksResp)) { throw new Error("Expected argument of type aggregator.UpdateChecksResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb2.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_protobuf_BoolValue(arg) { if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { @@ -5094,8 +5188,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/GetKey", requestStream: false, responseStream: false, - requestType: avs_pb2.GetKeyReq, - responseType: avs_pb2.KeyResp, + requestType: avs_pb3.GetKeyReq, + responseType: avs_pb3.KeyResp, requestSerialize: serialize_aggregator_GetKeyReq, requestDeserialize: deserialize_aggregator_GetKeyReq, responseSerialize: serialize_aggregator_KeyResp, @@ -5106,42 +5200,42 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/GetNonce", requestStream: false, responseStream: false, - requestType: avs_pb2.NonceRequest, - responseType: avs_pb2.NonceResp, + requestType: avs_pb3.NonceRequest, + responseType: avs_pb3.NonceResp, requestSerialize: serialize_aggregator_NonceRequest, requestDeserialize: deserialize_aggregator_NonceRequest, responseSerialize: serialize_aggregator_NonceResp, responseDeserialize: deserialize_aggregator_NonceResp }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - requestStream: false, - responseStream: false, - requestType: avs_pb2.AddressRequest, - responseType: avs_pb2.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp - }, - // Task Management createWallet: { path: "/aggregator.Aggregator/CreateWallet", requestStream: false, responseStream: false, - requestType: avs_pb2.CreateWalletReq, - responseType: avs_pb2.CreateWalletResp, + requestType: avs_pb3.CreateWalletReq, + responseType: avs_pb3.CreateWalletResp, requestSerialize: serialize_aggregator_CreateWalletReq, requestDeserialize: deserialize_aggregator_CreateWalletReq, responseSerialize: serialize_aggregator_CreateWalletResp, responseDeserialize: deserialize_aggregator_CreateWalletResp }, + listWallets: { + path: "/aggregator.Aggregator/ListWallets", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListWalletReq, + responseType: avs_pb3.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp + }, + // Task Management createTask: { path: "/aggregator.Aggregator/CreateTask", requestStream: false, responseStream: false, - requestType: avs_pb2.CreateTaskReq, - responseType: avs_pb2.CreateTaskResp, + requestType: avs_pb3.CreateTaskReq, + responseType: avs_pb3.CreateTaskResp, requestSerialize: serialize_aggregator_CreateTaskReq, requestDeserialize: deserialize_aggregator_CreateTaskReq, responseSerialize: serialize_aggregator_CreateTaskResp, @@ -5151,8 +5245,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/ListTasks", requestStream: false, responseStream: false, - requestType: avs_pb2.ListTasksReq, - responseType: avs_pb2.ListTasksResp, + requestType: avs_pb3.ListTasksReq, + responseType: avs_pb3.ListTasksResp, requestSerialize: serialize_aggregator_ListTasksReq, requestDeserialize: deserialize_aggregator_ListTasksReq, responseSerialize: serialize_aggregator_ListTasksResp, @@ -5162,10 +5256,10 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/GetTask", requestStream: false, responseStream: false, - requestType: avs_pb2.UUID, - responseType: avs_pb2.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestType: avs_pb3.IdReq, + responseType: avs_pb3.Task, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_aggregator_Task, responseDeserialize: deserialize_aggregator_Task }, @@ -5173,10 +5267,10 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/CancelTask", requestStream: false, responseStream: false, - requestType: avs_pb2.UUID, + requestType: avs_pb3.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue }, @@ -5184,10 +5278,10 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/DeleteTask", requestStream: false, responseStream: false, - requestType: avs_pb2.UUID, + requestType: avs_pb3.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue }, @@ -5196,8 +5290,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/Ping", requestStream: false, responseStream: false, - requestType: avs_pb2.Checkin, - responseType: avs_pb2.CheckinResp, + requestType: avs_pb3.Checkin, + responseType: avs_pb3.CheckinResp, requestSerialize: serialize_aggregator_Checkin, requestDeserialize: deserialize_aggregator_Checkin, responseSerialize: serialize_aggregator_CheckinResp, @@ -5207,8 +5301,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/SyncTasks", requestStream: false, responseStream: true, - requestType: avs_pb2.SyncTasksReq, - responseType: avs_pb2.SyncTasksResp, + requestType: avs_pb3.SyncTasksReq, + responseType: avs_pb3.SyncTasksResp, requestSerialize: serialize_aggregator_SyncTasksReq, requestDeserialize: deserialize_aggregator_SyncTasksReq, responseSerialize: serialize_aggregator_SyncTasksResp, @@ -5218,8 +5312,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/UpdateChecks", requestStream: false, responseStream: false, - requestType: avs_pb2.UpdateChecksReq, - responseType: avs_pb2.UpdateChecksResp, + requestType: avs_pb3.UpdateChecksReq, + responseType: avs_pb3.UpdateChecksResp, requestSerialize: serialize_aggregator_UpdateChecksReq, requestDeserialize: deserialize_aggregator_UpdateChecksReq, responseSerialize: serialize_aggregator_UpdateChecksResp, @@ -5239,50 +5333,165 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); var import_lodash = __toESM(require("lodash")); -var import_ethers = require("ethers"); var grpc = __toESM(require("@grpc/grpc-js")); var import_grpc_js = require("@grpc/grpc-js"); // src/auth.ts -var getKeyRequestMessage = (address2, expiredAt) => { - return `key request for ${address2} expired at ${expiredAt}`; +var getKeyRequestMessage = (address, expiredAt) => { + return `key request for ${address} expired at ${expiredAt}`; }; // src/index.ts var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); -var avs_pb = __toESM(require_avs_pb()); +var avs_pb2 = __toESM(require_avs_pb()); -// src/types.ts -var AUTH_KEY_HEADER = "authKey"; +// src/builder.ts +var avs_pb = __toESM(require_avs_pb()); +var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress2); + n.setCallData(callData); + if (contractABI) { + n.setContractAbi(contractABI); + } + return n; +}; +var buildContractRead = ({ contract_ddress, callData, contractABI }) => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + n.setContractAbi(n.contractABI); + } + return n; +}; +var buildTaskEdge = ({ id, source, target }) => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + return edge; +}; +var buildTrigger = (payload) => { + const trigger = new avs_pb.TaskTrigger(); + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + return trigger; + } + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + trigger.setEvent(event); + return trigger; + } + throw new Error("missing trigger"); + } +}; +var triggerFromGRPC = (trigger) => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; + } + const base = { + triggerType: trigger.getTriggerTypeCase() + }; + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() }; + break; + } + return base; +}; +var nodeFromGRPC = (node) => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + }; + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = base.branch; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; + } + return standarize; +}; // src/task.ts var Task = class { - // Add other missing properties here constructor(task) { - this.id = task.getId()?.toString() || ""; - this.status = task.getStatus().toString(); + this.id = task.getId() || ""; + this.status = task.getStatus(); this.owner = task.getOwner(); - this.smartAccountAddress = task.getSmartAccountAddress(); - this.trigger = { - triggerType: task.getTrigger()?.getTriggerType() || 0, - schedule: task.getTrigger()?.getSchedule()?.toObject(), - contractQuery: task.getTrigger()?.getContractQuery()?.toObject(), - expression: task.getTrigger()?.getExpression()?.toObject() || { - expression: "" - } - }; - this.nodesList = task.getNodesList(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.repeatable = task.getRepeatable(); this.executionsList = task.getExecutionsList(); + this.maxExecution = task.getMaxExecution(); } }; var task_default = Task; +// src/types.ts +var AUTH_KEY_HEADER = "authkey"; + // src/index.ts var BaseClient = class { constructor(opts) { @@ -5305,34 +5514,30 @@ var BaseClient = class { } } // When using the APIkey, depends on scope of the key, it may have access to one ore more account - async authWithAPIKey(address2, apiKey, expiredAtEpoch) { - const request = new avs_pb.GetKeyReq(); - request.setOwner(address2); + async authWithAPIKey(address, apiKey, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); - const result = await this._callRPC("getKey", request); - this.authKey = result.getKey(); + const result = await this._callAnonRPC("getKey", request); return { authKey: result.getKey() }; } // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address2, signature, expiredAtEpoch) { - const request = new avs_pb.GetKeyReq(); - request.setOwner(address2); + async authWithSignature(address, signature, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); - let result = await this._callRPC( + let result = await this._callAnonRPC( "getKey", request ); - console.log("my key is ", result, result.getKey()); - this.authKey = result.getKey(); return { authKey: result.getKey() }; } _callRPC(method, request, options) { const metadata = import_lodash.default.cloneDeep(this.metadata); - console.log("my authkey", this.authkey); - if (!this.authKey) { - throw new Error("Not authenticated yet"); + if (!options?.authKey) { + throw new Error("missing auth header"); } metadata.set(AUTH_KEY_HEADER, options.authKey); return new Promise((resolve, reject) => { @@ -5347,10 +5552,11 @@ var BaseClient = class { }); } _callAnonRPC(method, request, options) { + const metadata = import_lodash.default.cloneDeep(this.metadata); return new Promise((resolve, reject) => { this.rpcClient[method].bind(this.rpcClient)( request, - this.metadata, + metadata, (error, response) => { if (error) reject(error); else resolve(response); @@ -5363,98 +5569,95 @@ var Client = class extends BaseClient { constructor(config) { super(config); } - async listSmartWallets() { - const request = new avs_pb.AddressRequest(); - request.setOwner(address); - const result = await this._callRPC("getSmartAccountAddress", request); - return { - owner: address, - wallets: result.getWalletsList() - }; + async listSmartWallets(options) { + const request = new avs_pb2.ListWalletReq(); + const result = await this._callRPC("listWallets", request, options); + return result.getWalletsList().map((item) => item.toObject()); } - async createTask({ - address: address2, - oracleContract, - tokenContract - }) { - const trigger = new avs_pb.TaskTrigger(); - trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); - trigger.setExpression( - new avs_pb.ExpressionCondition().setExpression(` - bigCmp( - priceChainlink("${oracleContract}"), - toBigInt("10000") - ) > 0`) - ); - const action = new avs_pb.TaskAction(); - action.setTaskType(avs_pb.TaskType.CONTRACTEXECUTIONTASK); - action.setId("transfer_erc20_1"); - action.setName("Transfer Test Token"); - const execution = new avs_pb.ContractExecution(); - execution.setContractAddress(tokenContract); - let ABI = ["function transfer(address to, uint amount)"]; - let iface = new import_ethers.ethers.Interface(ABI); - const callData = iface.encodeFunctionData("transfer", [ - address2, - import_ethers.ethers.parseUnits("12", 18) - ]); - execution.setCallData(callData); - action.setContractExecution(execution); - const request = new avs_pb.CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); - const result = await this._callRPC("createTask", request, { authKey }); + async createWallet({ + salt, + factoryAddress + }, options) { + const request = new avs_pb2.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + const result = await this._callRPC("createWallet", request, options); return { - id: result.getId() + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress() }; } - async listTasks(address2) { - const request = new avs_pb.ListTasksReq(); - const result = await this._callRPC("listTasks", request, { authKey }); - const tasks = import_lodash.default.map( - result.getTasksList(), - (obj) => { - return { - id: obj.getId(), - status: import_lodash.default.capitalize(obj.getStatus().toString()) - }; - } - ); - return { - tasks - }; + async createTask(payload, options) { + const request = new avs_pb2.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + request.setTrigger(buildTrigger(payload.trigger)); + let nodes = []; + for (const node of payload.nodes) { + const n = new avs_pb2.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else { + throw new Error("missing task payload"); + } + nodes.push(n); + request.addNodes(n); + } + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + const result = await this._callRPC("createTask", request, options); + return result.getId(); + } + async listTasks(address, options) { + const request = new avs_pb2.ListTasksReq(); + request.setSmartWalletAddress(address); + const result = await this._callRPC("listTasks", request, options); + return result.getTasksList().map((item) => new task_default(item)); } // TODO: specify the return type to match client’s requirements - // Right now we simply return the original object from the server - async getTask(id) { - const request = new avs_pb.UUID(); - request.setBytes(id); - ``; + async getTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "getTask", - request + request, + options ); return new task_default(result); } - async cancelTask(id) { - const request = new avs_pb.UUID(); - request.setBytes(id); + async cancelTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "cancelTask", - request + request, + options ); - return { - value: result.getValue() - }; + return result.getValue(); } - async deleteTask(id) { - const request = new avs_pb.UUID(); - request.setBytes(id); + async deleteTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "deleteTask", - request + request, + options ); - return { - value: result.getValue() - }; + return result.getValue(); } }; // Annotate the CommonJS export names for ESM import in node: diff --git a/dist/index.mjs b/dist/index.mjs index 8c84996..a363dac 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -55,15 +55,13 @@ var require_avs_pb = __commonJS({ goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); goog.object.extend(proto, google_protobuf_wrappers_pb); - goog.exportSymbol("proto.aggregator.AddressRequest", null, global); - goog.exportSymbol("proto.aggregator.AddressResp", null, global); goog.exportSymbol("proto.aggregator.BlockCondition", null, global); goog.exportSymbol("proto.aggregator.BranchNode", null, global); goog.exportSymbol("proto.aggregator.Checkin", null, global); goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); goog.exportSymbol("proto.aggregator.CheckinResp", null, global); - goog.exportSymbol("proto.aggregator.ConditionJump", null, global); - goog.exportSymbol("proto.aggregator.ContractQueryNode", null, global); + goog.exportSymbol("proto.aggregator.Condition", null, global); + goog.exportSymbol("proto.aggregator.ContractReadNode", null, global); goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); @@ -80,9 +78,13 @@ var require_avs_pb = __commonJS({ goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); + goog.exportSymbol("proto.aggregator.IdReq", null, global); goog.exportSymbol("proto.aggregator.KeyResp", null, global); goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); + goog.exportSymbol("proto.aggregator.ListWalletReq", null, global); + goog.exportSymbol("proto.aggregator.ListWalletResp", null, global); + goog.exportSymbol("proto.aggregator.LoopNode", null, global); goog.exportSymbol("proto.aggregator.NonceRequest", null, global); goog.exportSymbol("proto.aggregator.NonceResp", null, global); goog.exportSymbol("proto.aggregator.RestAPINode", null, global); @@ -92,21 +94,18 @@ var require_avs_pb = __commonJS({ goog.exportSymbol("proto.aggregator.Task", null, global); goog.exportSymbol("proto.aggregator.TaskEdge", null, global); goog.exportSymbol("proto.aggregator.TaskNode", null, global); - goog.exportSymbol("proto.aggregator.TaskNode.TaskBodyCase", null, global); + goog.exportSymbol("proto.aggregator.TaskNode.TaskTypeCase", null, global); goog.exportSymbol("proto.aggregator.TaskStatus", null, global); goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerConditionCase", null, global); - goog.exportSymbol("proto.aggregator.TaskType", null, global); - goog.exportSymbol("proto.aggregator.TriggerType", null, global); - goog.exportSymbol("proto.aggregator.UUID", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global); goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); - proto.aggregator.UUID = function(opt_data) { + proto.aggregator.IdReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.UUID, jspb.Message); + goog.inherits(proto.aggregator.IdReq, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; + proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; } proto.aggregator.Checkin = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -192,12 +191,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; } - proto.aggregator.ContractQueryNode = function(opt_data) { + proto.aggregator.ContractReadNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); + goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractQueryNode.displayName = "proto.aggregator.ContractQueryNode"; + proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; } proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -220,12 +219,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; } - proto.aggregator.ConditionJump = function(opt_data) { + proto.aggregator.Condition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ConditionJump, jspb.Message); + goog.inherits(proto.aggregator.Condition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; + proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; } proto.aggregator.BranchNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); @@ -241,6 +240,13 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; } + proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.LoopNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; + } proto.aggregator.TaskEdge = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; @@ -297,12 +303,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; } - proto.aggregator.AddressRequest = function(opt_data) { + proto.aggregator.ListWalletReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.AddressRequest, jspb.Message); + goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; + proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; } proto.aggregator.SmartWallet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -311,12 +317,12 @@ var require_avs_pb = __commonJS({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; } - proto.aggregator.AddressResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); + proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); }; - goog.inherits(proto.aggregator.AddressResp, jspb.Message); + goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; + proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; } proto.aggregator.ListTasksReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -375,12 +381,12 @@ var require_avs_pb = __commonJS({ proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; } if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); + proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.toObject(opt_includeInstance, this); }; - proto.aggregator.UUID.toObject = function(includeInstance, msg) { + proto.aggregator.IdReq.toObject = function(includeInstance, msg) { var f, obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -388,12 +394,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.UUID.deserializeBinary = function(bytes) { + proto.aggregator.IdReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID(); - return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.IdReq(); + return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -405,7 +411,7 @@ var require_avs_pb = __commonJS({ /** @type {string} */ reader.readString() ); - msg.setBytes(value); + msg.setId(value); break; default: reader.skipField(); @@ -414,14 +420,14 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.UUID.prototype.serializeBinary = function() { + proto.aggregator.IdReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UUID.serializeBinaryToWriter(this, writer); + proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getBytes(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -429,13 +435,13 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.UUID.prototype.getBytes = function() { + proto.aggregator.IdReq.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UUID.prototype.setBytes = function(value) { + proto.aggregator.IdReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -980,7 +986,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { var f, obj = { - epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1006,7 +1012,7 @@ var require_avs_pb = __commonJS({ reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] ); for (var i = 0; i < values.length; i++) { - msg.addEpoches(values[i]); + msg.addEpochs(values[i]); } break; default: @@ -1023,7 +1029,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getEpochesList(); + f = message.getEpochsList(); if (f.length > 0) { writer.writePackedInt64( 1, @@ -1031,20 +1037,20 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { + proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { return ( /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { + proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { + proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { - return this.setEpochesList([]); + proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; proto.aggregator.CronCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1053,7 +1059,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1078,7 +1084,7 @@ var require_avs_pb = __commonJS({ /** @type {string} */ reader.readString() ); - msg.addCronTable(value); + msg.addSchedule(value); break; default: reader.skipField(); @@ -1094,7 +1100,7 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getCronTableList(); + f = message.getScheduleList(); if (f.length > 0) { writer.writeRepeatedString( 1, @@ -1102,20 +1108,20 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.CronCondition.prototype.getCronTableList = function() { + proto.aggregator.CronCondition.prototype.getScheduleList = function() { return ( /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { + proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.CronCondition.prototype.addCronTable = function(value, opt_index) { + proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.CronCondition.prototype.clearCronTableList = function() { - return this.setCronTableList([]); + proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { @@ -1245,18 +1251,18 @@ var require_avs_pb = __commonJS({ proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.TaskTrigger.oneofGroups_ = [[2, 3, 4, 5, 6]]; - proto.aggregator.TaskTrigger.TriggerConditionCase = { - TRIGGER_CONDITION_NOT_SET: 0, - MANUAL: 2, - AT: 3, - CRON: 4, - BLOCK: 5, - EVENT: 6 + proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; + proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 }; - proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { + proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { return ( - /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */ + /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */ jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) ); }; @@ -1266,9 +1272,8 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), - at: (f = msg.getAt()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) @@ -1292,35 +1297,28 @@ var require_avs_pb = __commonJS({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = ( - /** @type {!proto.aggregator.TriggerType} */ - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: var value = ( /** @type {boolean} */ reader.readBool() ); msg.setManual(value); break; - case 3: + case 2: var value = new proto.aggregator.FixedEpochCondition(); reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); - msg.setAt(value); + msg.setFixedTime(value); break; - case 4: + case 3: var value = new proto.aggregator.CronCondition(); reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); msg.setCron(value); break; - case 5: + case 4: var value = new proto.aggregator.BlockCondition(); reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); msg.setBlock(value); break; - case 6: + case 5: var value = new proto.aggregator.EventCondition(); reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); msg.setEvent(value); @@ -1339,25 +1337,18 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } f = /** @type {boolean} */ - jspb.Message.getField(message, 2); + jspb.Message.getField(message, 1); if (f != null) { writer.writeBool( - 2, + 1, f ); } - f = message.getAt(); + f = message.getFixedTime(); if (f != null) { writer.writeMessage( - 3, + 2, f, proto.aggregator.FixedEpochCondition.serializeBinaryToWriter ); @@ -1365,7 +1356,7 @@ var require_avs_pb = __commonJS({ f = message.getCron(); if (f != null) { writer.writeMessage( - 4, + 3, f, proto.aggregator.CronCondition.serializeBinaryToWriter ); @@ -1373,7 +1364,7 @@ var require_avs_pb = __commonJS({ f = message.getBlock(); if (f != null) { writer.writeMessage( - 5, + 4, f, proto.aggregator.BlockCondition.serializeBinaryToWriter ); @@ -1381,95 +1372,86 @@ var require_avs_pb = __commonJS({ f = message.getEvent(); if (f != null) { writer.writeMessage( - 6, + 5, f, proto.aggregator.EventCondition.serializeBinaryToWriter ); } }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; proto.aggregator.TaskTrigger.prototype.getManual = function() { return ( /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 2, false) + jspb.Message.getBooleanFieldWithDefault(this, 1, false) ); }; proto.aggregator.TaskTrigger.prototype.setManual = function(value) { - return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearManual = function() { - return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); }; proto.aggregator.TaskTrigger.prototype.hasManual = function() { - return jspb.Message.getField(this, 2) != null; + return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.TaskTrigger.prototype.getAt = function() { + proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { return ( /** @type{?proto.aggregator.FixedEpochCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3) + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) ); }; - proto.aggregator.TaskTrigger.prototype.setAt = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; - proto.aggregator.TaskTrigger.prototype.clearAt = function() { - return this.setAt(void 0); + proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(void 0); }; - proto.aggregator.TaskTrigger.prototype.hasAt = function() { - return jspb.Message.getField(this, 3) != null; + proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; }; proto.aggregator.TaskTrigger.prototype.getCron = function() { return ( /** @type{?proto.aggregator.CronCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4) + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) ); }; proto.aggregator.TaskTrigger.prototype.setCron = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearCron = function() { return this.setCron(void 0); }; proto.aggregator.TaskTrigger.prototype.hasCron = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 3) != null; }; proto.aggregator.TaskTrigger.prototype.getBlock = function() { return ( /** @type{?proto.aggregator.BlockCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5) + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) ); }; proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearBlock = function() { return this.setBlock(void 0); }; proto.aggregator.TaskTrigger.prototype.hasBlock = function() { - return jspb.Message.getField(this, 5) != null; + return jspb.Message.getField(this, 4) != null; }; proto.aggregator.TaskTrigger.prototype.getEvent = function() { return ( /** @type{?proto.aggregator.EventCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6) + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) ); }; proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; proto.aggregator.TaskTrigger.prototype.clearEvent = function() { return this.setEvent(void 0); }; proto.aggregator.TaskTrigger.prototype.hasEvent = function() { - return jspb.Message.getField(this, 6) != null; + return jspb.Message.getField(this, 5) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { @@ -1789,10 +1771,10 @@ var require_avs_pb = __commonJS({ return jspb.Message.setProto3StringField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); + proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractQueryNode.toObject = function(includeInstance, msg) { + proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), callData: jspb.Message.getFieldWithDefault(msg, 2, ""), @@ -1804,12 +1786,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.ContractQueryNode.deserializeBinary = function(bytes) { + proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryNode(); - return proto.aggregator.ContractQueryNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractReadNode(); + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1844,12 +1826,12 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.ContractQueryNode.prototype.serializeBinary = function() { + proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getContractAddress(); if (f.length > 0) { @@ -1873,31 +1855,31 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { + proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { + proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ContractQueryNode.prototype.getCallData = function() { + proto.aggregator.ContractReadNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ContractQueryNode.prototype.setCallData = function(value) { + proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { + proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { + proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1907,7 +1889,8 @@ var require_avs_pb = __commonJS({ proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1941,6 +1924,12 @@ var require_avs_pb = __commonJS({ ); msg.setQuery(value); break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; default: reader.skipField(); break; @@ -1969,6 +1958,10 @@ var require_avs_pb = __commonJS({ f ); } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } }; proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return ( @@ -1988,6 +1981,21 @@ var require_avs_pb = __commonJS({ proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 3, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this; + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); @@ -2215,13 +2223,14 @@ var require_avs_pb = __commonJS({ return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); + proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); }; - proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { + proto.aggregator.Condition.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2229,12 +2238,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { + proto.aggregator.Condition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.Condition(); + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2246,14 +2255,21 @@ var require_avs_pb = __commonJS({ /** @type {string} */ reader.readString() ); - msg.setExpression(value); + msg.setId(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setNext(value); + msg.setType(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); break; default: reader.skipField(); @@ -2262,60 +2278,74 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.ConditionJump.prototype.serializeBinary = function() { + proto.aggregator.Condition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getExpression(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getNext(); + f = message.getType(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; - proto.aggregator.ConditionJump.prototype.getExpression = function() { + proto.aggregator.Condition.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ConditionJump.prototype.setExpression = function(value) { + proto.aggregator.Condition.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ConditionJump.prototype.getNext = function() { + proto.aggregator.Condition.prototype.getType = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ConditionJump.prototype.setNext = function(value) { + proto.aggregator.Condition.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchNode.repeatedFields_ = [2]; + proto.aggregator.Condition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.BranchNode.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList( - msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, + conditionsList: jspb.Message.toObjectList( + msg.getConditionsList(), + proto.aggregator.Condition.toObject, includeInstance - ), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2336,19 +2366,9 @@ var require_avs_pb = __commonJS({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); + var value = new proto.aggregator.Condition(); + reader.readMessage(value, proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); break; default: reader.skipField(); @@ -2364,75 +2384,29 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getIf(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElseifsList(); + f = message.getConditionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, + 1, f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + proto.aggregator.Condition.serializeBinaryToWriter ); } }; - proto.aggregator.BranchNode.prototype.getIf = function() { + proto.aggregator.BranchNode.prototype.getConditionsList = function() { return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) ); }; - proto.aggregator.BranchNode.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.BranchNode.prototype.clearIf = function() { - return this.setIf(void 0); - }; - proto.aggregator.BranchNode.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.BranchNode.prototype.getElseifsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2) - ); - }; - proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); - }; - proto.aggregator.BranchNode.prototype.clearElseifsList = function() { - return this.setElseifsList([]); - }; - proto.aggregator.BranchNode.prototype.getElse = function() { - return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) - ); - }; - proto.aggregator.BranchNode.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; - proto.aggregator.BranchNode.prototype.clearElse = function() { - return this.setElse(void 0); + proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); }; - proto.aggregator.BranchNode.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; + proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { @@ -2498,6 +2472,94 @@ var require_avs_pb = __commonJS({ proto.aggregator.FilterNode.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode(); + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterVar(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.LoopNode.prototype.getIterVar = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.LoopNode.prototype.getIterKey = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); @@ -2610,9 +2672,9 @@ var require_avs_pb = __commonJS({ proto.aggregator.TaskEdge.prototype.setTarget = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17]]; - proto.aggregator.TaskNode.TaskBodyCase = { - TASK_BODY_NOT_SET: 0, + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; + proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, ETH_TRANSFER: 10, CONTRACT_WRITE: 11, CONTRACT_READ: 12, @@ -2620,11 +2682,12 @@ var require_avs_pb = __commonJS({ REST_API: 14, BRANCH: 15, FILTER: 16, - CUSTOM_CODE: 17 + LOOP: 17, + CUSTOM_CODE: 18 }; - proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { + proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { return ( - /** @type {proto.aggregator.TaskNode.TaskBodyCase} */ + /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) ); }; @@ -2634,16 +2697,16 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { var f, obj = { - nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 3, ""), ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), - contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractQueryNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) }; if (includeInstance) { @@ -2664,13 +2727,6 @@ var require_avs_pb = __commonJS({ } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TaskType} */ - reader.readEnum() - ); - msg.setNodeType(value); - break; case 2: var value = ( /** @type {string} */ @@ -2696,8 +2752,8 @@ var require_avs_pb = __commonJS({ msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.ContractQueryNode(); - reader.readMessage(value, proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + var value = new proto.aggregator.ContractReadNode(); + reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); msg.setContractRead(value); break; case 13: @@ -2721,6 +2777,11 @@ var require_avs_pb = __commonJS({ msg.setFilter(value); break; case 17: + var value = new proto.aggregator.LoopNode(); + reader.readMessage(value, proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: var value = new proto.aggregator.CustomCodeNode(); reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); msg.setCustomCode(value); @@ -2739,13 +2800,6 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getNodeType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } f = message.getId(); if (f.length > 0) { writer.writeString( @@ -2781,7 +2835,7 @@ var require_avs_pb = __commonJS({ writer.writeMessage( 12, f, - proto.aggregator.ContractQueryNode.serializeBinaryToWriter + proto.aggregator.ContractReadNode.serializeBinaryToWriter ); } f = message.getGraphqlDataQuery(); @@ -2816,24 +2870,23 @@ var require_avs_pb = __commonJS({ proto.aggregator.FilterNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getLoop(); if (f != null) { writer.writeMessage( 17, f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, proto.aggregator.CustomCodeNode.serializeBinaryToWriter ); } }; - proto.aggregator.TaskNode.prototype.getNodeType = function() { - return ( - /** @type {!proto.aggregator.TaskType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskNode.prototype.setNodeType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; proto.aggregator.TaskNode.prototype.getId = function() { return ( /** @type {string} */ @@ -2884,8 +2937,8 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.TaskNode.prototype.getContractRead = function() { return ( - /** @type{?proto.aggregator.ContractQueryNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12) + /** @type{?proto.aggregator.ContractReadNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) ); }; proto.aggregator.TaskNode.prototype.setContractRead = function(value) { @@ -2957,20 +3010,35 @@ var require_avs_pb = __commonJS({ proto.aggregator.TaskNode.prototype.hasFilter = function() { return jspb.Message.getField(this, 16) != null; }; + proto.aggregator.TaskNode.prototype.getLoop = function() { + return ( + /** @type{?proto.aggregator.LoopNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(void 0); + }; + proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; + }; proto.aggregator.TaskNode.prototype.getCustomCode = function() { return ( /** @type{?proto.aggregator.CustomCodeNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17) + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) ); }; proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); }; proto.aggregator.TaskNode.prototype.clearCustomCode = function() { return this.setCustomCode(void 0); }; proto.aggregator.TaskNode.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 17) != null; + return jspb.Message.getField(this, 18) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { @@ -3091,14 +3159,14 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.Task.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), + id: jspb.Message.getFieldWithDefault(msg, 1, ""), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - memo: jspb.Message.getFieldWithDefault(msg, 7, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), - recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), status: jspb.Message.getFieldWithDefault(msg, 9, 0), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), nodesList: jspb.Message.toObjectList( @@ -3136,8 +3204,10 @@ var require_avs_pb = __commonJS({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.UUID(); - reader.readMessage(value, proto.aggregator.UUID.deserializeBinaryFromReader); + var value = ( + /** @type {string} */ + reader.readString() + ); msg.setId(value); break; case 2: @@ -3154,40 +3224,40 @@ var require_avs_pb = __commonJS({ ); msg.setSmartWalletAddress(value); break; - case 5: + case 4: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 6: + case 5: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; - case 7: + case 6: var value = ( /** @type {string} */ reader.readString() ); msg.setMemo(value); break; - case 8: + case 7: var value = ( /** @type {number} */ reader.readInt64() ); msg.setCompletedAt(value); break; - case 10: + case 8: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {number} */ + reader.readInt64() ); - msg.setRecurring(value); + msg.setMaxExecution(value); break; case 9: var value = ( @@ -3196,7 +3266,7 @@ var require_avs_pb = __commonJS({ ); msg.setStatus(value); break; - case 4: + case 10: var value = new proto.aggregator.TaskTrigger(); reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); @@ -3231,11 +3301,10 @@ var require_avs_pb = __commonJS({ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getId(); - if (f != null) { - writer.writeMessage( + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.UUID.serializeBinaryToWriter + f ); } f = message.getOwner(); @@ -3255,35 +3324,35 @@ var require_avs_pb = __commonJS({ f = message.getStartAt(); if (f !== 0) { writer.writeInt64( - 5, + 4, f ); } f = message.getExpiredAt(); if (f !== 0) { writer.writeInt64( - 6, + 5, f ); } f = message.getMemo(); if (f.length > 0) { writer.writeString( - 7, + 6, f ); } f = message.getCompletedAt(); if (f !== 0) { writer.writeInt64( - 8, + 7, f ); } - f = message.getRecurring(); - if (f) { - writer.writeBool( - 10, + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, f ); } @@ -3297,7 +3366,7 @@ var require_avs_pb = __commonJS({ f = message.getTrigger(); if (f != null) { writer.writeMessage( - 4, + 10, f, proto.aggregator.TaskTrigger.serializeBinaryToWriter ); @@ -3329,18 +3398,12 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.Task.prototype.getId = function() { return ( - /** @type{?proto.aggregator.UUID} */ - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.Task.prototype.clearId = function() { - return this.setId(void 0); - }; - proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; + return jspb.Message.setProto3StringField(this, 1, value); }; proto.aggregator.Task.prototype.getOwner = function() { return ( @@ -3363,47 +3426,47 @@ var require_avs_pb = __commonJS({ proto.aggregator.Task.prototype.getStartAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 5, 0) + jspb.Message.getFieldWithDefault(this, 4, 0) ); }; proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 4, value); }; proto.aggregator.Task.prototype.getExpiredAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) + jspb.Message.getFieldWithDefault(this, 5, 0) ); }; proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 5, value); }; proto.aggregator.Task.prototype.getMemo = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 7, "") + jspb.Message.getFieldWithDefault(this, 6, "") ); }; proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 6, value); }; proto.aggregator.Task.prototype.getCompletedAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 8, 0) + jspb.Message.getFieldWithDefault(this, 7, 0) ); }; proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); + return jspb.Message.setProto3IntField(this, 7, value); }; - proto.aggregator.Task.prototype.getRecurring = function() { + proto.aggregator.Task.prototype.getMaxExecution = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 10, false) + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 8, 0) ); }; - proto.aggregator.Task.prototype.setRecurring = function(value) { - return jspb.Message.setProto3BooleanField(this, 10, value); + proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; proto.aggregator.Task.prototype.getStatus = function() { return ( @@ -3417,17 +3480,17 @@ var require_avs_pb = __commonJS({ proto.aggregator.Task.prototype.getTrigger = function() { return ( /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) ); }; proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + return jspb.Message.setWrapperField(this, 10, value); }; proto.aggregator.Task.prototype.clearTrigger = function() { return this.setTrigger(void 0); }; proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; + return jspb.Message.getField(this, 10) != null; }; proto.aggregator.Task.prototype.getNodesList = function() { return ( @@ -3484,7 +3547,7 @@ var require_avs_pb = __commonJS({ trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), memo: jspb.Message.getFieldWithDefault(msg, 6, ""), nodesList: jspb.Message.toObjectList( @@ -3537,10 +3600,10 @@ var require_avs_pb = __commonJS({ break; case 4: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {number} */ + reader.readInt64() ); - msg.setRepeatable(value); + msg.setMaxExecution(value); break; case 5: var value = ( @@ -3602,9 +3665,9 @@ var require_avs_pb = __commonJS({ f ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool( + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( 4, f ); @@ -3673,14 +3736,14 @@ var require_avs_pb = __commonJS({ proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 4, false) + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 4, value); + proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { return ( @@ -3923,10 +3986,10 @@ var require_avs_pb = __commonJS({ return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); + proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { + proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { var f, obj = { factory: jspb.Message.getFieldWithDefault(msg, 1, ""), salt: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -3937,12 +4000,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { + proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletReq(); + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3970,12 +4033,12 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.AddressRequest.prototype.serializeBinary = function() { + proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getFactory(); if (f.length > 0) { @@ -3992,22 +4055,22 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.AddressRequest.prototype.getFactory = function() { + proto.aggregator.ListWalletReq.prototype.getFactory = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressRequest.prototype.setFactory = function(value) { + proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.AddressRequest.prototype.getSalt = function() { + proto.aggregator.ListWalletReq.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.AddressRequest.prototype.setSalt = function(value) { + proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4122,12 +4185,12 @@ var require_avs_pb = __commonJS({ proto.aggregator.SmartWallet.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.AddressResp.repeatedFields_ = [1]; + proto.aggregator.ListWalletResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); + proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { var f, obj = { walletsList: jspb.Message.toObjectList( msg.getWalletsList(), @@ -4141,12 +4204,12 @@ var require_avs_pb = __commonJS({ return obj; }; } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { + proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletResp(); + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4165,12 +4228,12 @@ var require_avs_pb = __commonJS({ } return msg; }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { + proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getWalletsList(); if (f.length > 0) { @@ -4181,19 +4244,19 @@ var require_avs_pb = __commonJS({ ); } }; - proto.aggregator.AddressResp.prototype.getWalletsList = function() { + proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { return ( /** @type{!Array} */ jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) ); }; - proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { + proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; - proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { + proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); }; - proto.aggregator.AddressResp.prototype.clearWalletsList = function() { + proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { return this.setWalletsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4792,7 +4855,9 @@ var require_avs_pb = __commonJS({ }; proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -4819,6 +4884,20 @@ var require_avs_pb = __commonJS({ ); msg.setAddress(value); break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; default: reader.skipField(); break; @@ -4840,6 +4919,20 @@ var require_avs_pb = __commonJS({ f ); } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; proto.aggregator.CreateWalletResp.prototype.getAddress = function() { return ( @@ -4850,12 +4943,23 @@ var require_avs_pb = __commonJS({ proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.TriggerType = { - MANUALTRIGGER: 0, - FIXEDEPOCHTRIGGER: 1, - CRONTRIGGER: 2, - BLOCKTRIGGER: 3, - EVENTTRIGGER: 4 + proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; proto.aggregator.Error = { UNKNOWERROR: 0, @@ -4877,16 +4981,6 @@ var require_avs_pb = __commonJS({ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTWRITETASK: 1, - CONTRACTREADTASK: 2, - GRAPHQLDATAQUERYTASK: 3, - RESTAPITASK: 4, - BRANCHTASK: 5, - FILTERTASK: 6, - CUSTOMCODETASK: 7 - }; goog.object.extend(exports, proto.aggregator); } }); @@ -4896,188 +4990,188 @@ var require_avs_grpc_pb = __commonJS({ "grpc_codegen/avs_grpc_pb.js"(exports) { "use strict"; var grpc2 = __require("@grpc/grpc-js"); - var avs_pb2 = require_avs_pb(); + var avs_pb3 = require_avs_pb(); var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); - function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb2.AddressRequest)) { - throw new Error("Expected argument of type aggregator.AddressRequest"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb2.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb2.AddressResp)) { - throw new Error("Expected argument of type aggregator.AddressResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb2.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); - } function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb2.Checkin)) { + if (!(arg instanceof avs_pb3.Checkin)) { throw new Error("Expected argument of type aggregator.Checkin"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb2.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb2.CheckinResp)) { + if (!(arg instanceof avs_pb3.CheckinResp)) { throw new Error("Expected argument of type aggregator.CheckinResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb2.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb2.CreateTaskReq)) { + if (!(arg instanceof avs_pb3.CreateTaskReq)) { throw new Error("Expected argument of type aggregator.CreateTaskReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb2.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb2.CreateTaskResp)) { + if (!(arg instanceof avs_pb3.CreateTaskResp)) { throw new Error("Expected argument of type aggregator.CreateTaskResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb2.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateWalletReq(arg) { - if (!(arg instanceof avs_pb2.CreateWalletReq)) { + if (!(arg instanceof avs_pb3.CreateWalletReq)) { throw new Error("Expected argument of type aggregator.CreateWalletReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateWalletReq(buffer_arg) { - return avs_pb2.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_CreateWalletResp(arg) { - if (!(arg instanceof avs_pb2.CreateWalletResp)) { + if (!(arg instanceof avs_pb3.CreateWalletResp)) { throw new Error("Expected argument of type aggregator.CreateWalletResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_CreateWalletResp(buffer_arg) { - return avs_pb2.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb2.GetKeyReq)) { + if (!(arg instanceof avs_pb3.GetKeyReq)) { throw new Error("Expected argument of type aggregator.GetKeyReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb2.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb3.IdReq)) { + throw new Error("Expected argument of type aggregator.IdReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb2.KeyResp)) { + if (!(arg instanceof avs_pb3.KeyResp)) { throw new Error("Expected argument of type aggregator.KeyResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb2.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb2.ListTasksReq)) { + if (!(arg instanceof avs_pb3.ListTasksReq)) { throw new Error("Expected argument of type aggregator.ListTasksReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb2.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb2.ListTasksResp)) { + if (!(arg instanceof avs_pb3.ListTasksResp)) { throw new Error("Expected argument of type aggregator.ListTasksResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb2.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb3.ListWalletReq)) { + throw new Error("Expected argument of type aggregator.ListWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb3.ListWalletResp)) { + throw new Error("Expected argument of type aggregator.ListWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb2.NonceRequest)) { + if (!(arg instanceof avs_pb3.NonceRequest)) { throw new Error("Expected argument of type aggregator.NonceRequest"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb2.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb2.NonceResp)) { + if (!(arg instanceof avs_pb3.NonceResp)) { throw new Error("Expected argument of type aggregator.NonceResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb2.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb2.SyncTasksReq)) { + if (!(arg instanceof avs_pb3.SyncTasksReq)) { throw new Error("Expected argument of type aggregator.SyncTasksReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb2.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb2.SyncTasksResp)) { + if (!(arg instanceof avs_pb3.SyncTasksResp)) { throw new Error("Expected argument of type aggregator.SyncTasksResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb2.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb2.Task)) { + if (!(arg instanceof avs_pb3.Task)) { throw new Error("Expected argument of type aggregator.Task"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_Task(buffer_arg) { - return avs_pb2.Task.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb2.UUID)) { - throw new Error("Expected argument of type aggregator.UUID"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb2.UUID.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb2.UpdateChecksReq)) { + if (!(arg instanceof avs_pb3.UpdateChecksReq)) { throw new Error("Expected argument of type aggregator.UpdateChecksReq"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb2.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb2.UpdateChecksResp)) { + if (!(arg instanceof avs_pb3.UpdateChecksResp)) { throw new Error("Expected argument of type aggregator.UpdateChecksResp"); } return Buffer.from(arg.serializeBinary()); } function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb2.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_protobuf_BoolValue(arg) { if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { @@ -5094,8 +5188,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/GetKey", requestStream: false, responseStream: false, - requestType: avs_pb2.GetKeyReq, - responseType: avs_pb2.KeyResp, + requestType: avs_pb3.GetKeyReq, + responseType: avs_pb3.KeyResp, requestSerialize: serialize_aggregator_GetKeyReq, requestDeserialize: deserialize_aggregator_GetKeyReq, responseSerialize: serialize_aggregator_KeyResp, @@ -5106,42 +5200,42 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/GetNonce", requestStream: false, responseStream: false, - requestType: avs_pb2.NonceRequest, - responseType: avs_pb2.NonceResp, + requestType: avs_pb3.NonceRequest, + responseType: avs_pb3.NonceResp, requestSerialize: serialize_aggregator_NonceRequest, requestDeserialize: deserialize_aggregator_NonceRequest, responseSerialize: serialize_aggregator_NonceResp, responseDeserialize: deserialize_aggregator_NonceResp }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - requestStream: false, - responseStream: false, - requestType: avs_pb2.AddressRequest, - responseType: avs_pb2.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp - }, - // Task Management createWallet: { path: "/aggregator.Aggregator/CreateWallet", requestStream: false, responseStream: false, - requestType: avs_pb2.CreateWalletReq, - responseType: avs_pb2.CreateWalletResp, + requestType: avs_pb3.CreateWalletReq, + responseType: avs_pb3.CreateWalletResp, requestSerialize: serialize_aggregator_CreateWalletReq, requestDeserialize: deserialize_aggregator_CreateWalletReq, responseSerialize: serialize_aggregator_CreateWalletResp, responseDeserialize: deserialize_aggregator_CreateWalletResp }, + listWallets: { + path: "/aggregator.Aggregator/ListWallets", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListWalletReq, + responseType: avs_pb3.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp + }, + // Task Management createTask: { path: "/aggregator.Aggregator/CreateTask", requestStream: false, responseStream: false, - requestType: avs_pb2.CreateTaskReq, - responseType: avs_pb2.CreateTaskResp, + requestType: avs_pb3.CreateTaskReq, + responseType: avs_pb3.CreateTaskResp, requestSerialize: serialize_aggregator_CreateTaskReq, requestDeserialize: deserialize_aggregator_CreateTaskReq, responseSerialize: serialize_aggregator_CreateTaskResp, @@ -5151,8 +5245,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/ListTasks", requestStream: false, responseStream: false, - requestType: avs_pb2.ListTasksReq, - responseType: avs_pb2.ListTasksResp, + requestType: avs_pb3.ListTasksReq, + responseType: avs_pb3.ListTasksResp, requestSerialize: serialize_aggregator_ListTasksReq, requestDeserialize: deserialize_aggregator_ListTasksReq, responseSerialize: serialize_aggregator_ListTasksResp, @@ -5162,10 +5256,10 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/GetTask", requestStream: false, responseStream: false, - requestType: avs_pb2.UUID, - responseType: avs_pb2.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestType: avs_pb3.IdReq, + responseType: avs_pb3.Task, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_aggregator_Task, responseDeserialize: deserialize_aggregator_Task }, @@ -5173,10 +5267,10 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/CancelTask", requestStream: false, responseStream: false, - requestType: avs_pb2.UUID, + requestType: avs_pb3.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue }, @@ -5184,10 +5278,10 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/DeleteTask", requestStream: false, responseStream: false, - requestType: avs_pb2.UUID, + requestType: avs_pb3.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue }, @@ -5196,8 +5290,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/Ping", requestStream: false, responseStream: false, - requestType: avs_pb2.Checkin, - responseType: avs_pb2.CheckinResp, + requestType: avs_pb3.Checkin, + responseType: avs_pb3.CheckinResp, requestSerialize: serialize_aggregator_Checkin, requestDeserialize: deserialize_aggregator_Checkin, responseSerialize: serialize_aggregator_CheckinResp, @@ -5207,8 +5301,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/SyncTasks", requestStream: false, responseStream: true, - requestType: avs_pb2.SyncTasksReq, - responseType: avs_pb2.SyncTasksResp, + requestType: avs_pb3.SyncTasksReq, + responseType: avs_pb3.SyncTasksResp, requestSerialize: serialize_aggregator_SyncTasksReq, requestDeserialize: deserialize_aggregator_SyncTasksReq, responseSerialize: serialize_aggregator_SyncTasksResp, @@ -5218,8 +5312,8 @@ var require_avs_grpc_pb = __commonJS({ path: "/aggregator.Aggregator/UpdateChecks", requestStream: false, responseStream: false, - requestType: avs_pb2.UpdateChecksReq, - responseType: avs_pb2.UpdateChecksResp, + requestType: avs_pb3.UpdateChecksReq, + responseType: avs_pb3.UpdateChecksResp, requestSerialize: serialize_aggregator_UpdateChecksReq, requestDeserialize: deserialize_aggregator_UpdateChecksReq, responseSerialize: serialize_aggregator_UpdateChecksResp, @@ -5232,50 +5326,165 @@ var require_avs_grpc_pb = __commonJS({ // src/index.ts import _ from "lodash"; -import { ethers } from "ethers"; import * as grpc from "@grpc/grpc-js"; import { Metadata } from "@grpc/grpc-js"; // src/auth.ts -var getKeyRequestMessage = (address2, expiredAt) => { - return `key request for ${address2} expired at ${expiredAt}`; +var getKeyRequestMessage = (address, expiredAt) => { + return `key request for ${address} expired at ${expiredAt}`; }; // src/index.ts var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); -var avs_pb = __toESM(require_avs_pb()); +var avs_pb2 = __toESM(require_avs_pb()); -// src/types.ts -var AUTH_KEY_HEADER = "authKey"; +// src/builder.ts +var avs_pb = __toESM(require_avs_pb()); +var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress2); + n.setCallData(callData); + if (contractABI) { + n.setContractAbi(contractABI); + } + return n; +}; +var buildContractRead = ({ contract_ddress, callData, contractABI }) => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + n.setContractAbi(n.contractABI); + } + return n; +}; +var buildTaskEdge = ({ id, source, target }) => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + return edge; +}; +var buildTrigger = (payload) => { + const trigger = new avs_pb.TaskTrigger(); + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + return trigger; + } + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + trigger.setEvent(event); + return trigger; + } + throw new Error("missing trigger"); + } +}; +var triggerFromGRPC = (trigger) => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; + } + const base = { + triggerType: trigger.getTriggerTypeCase() + }; + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() }; + break; + } + return base; +}; +var nodeFromGRPC = (node) => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + }; + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = base.branch; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; + } + return standarize; +}; // src/task.ts var Task = class { - // Add other missing properties here constructor(task) { - this.id = task.getId()?.toString() || ""; - this.status = task.getStatus().toString(); + this.id = task.getId() || ""; + this.status = task.getStatus(); this.owner = task.getOwner(); - this.smartAccountAddress = task.getSmartAccountAddress(); - this.trigger = { - triggerType: task.getTrigger()?.getTriggerType() || 0, - schedule: task.getTrigger()?.getSchedule()?.toObject(), - contractQuery: task.getTrigger()?.getContractQuery()?.toObject(), - expression: task.getTrigger()?.getExpression()?.toObject() || { - expression: "" - } - }; - this.nodesList = task.getNodesList(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.repeatable = task.getRepeatable(); this.executionsList = task.getExecutionsList(); + this.maxExecution = task.getMaxExecution(); } }; var task_default = Task; +// src/types.ts +var AUTH_KEY_HEADER = "authkey"; + // src/index.ts var BaseClient = class { constructor(opts) { @@ -5298,34 +5507,30 @@ var BaseClient = class { } } // When using the APIkey, depends on scope of the key, it may have access to one ore more account - async authWithAPIKey(address2, apiKey, expiredAtEpoch) { - const request = new avs_pb.GetKeyReq(); - request.setOwner(address2); + async authWithAPIKey(address, apiKey, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); - const result = await this._callRPC("getKey", request); - this.authKey = result.getKey(); + const result = await this._callAnonRPC("getKey", request); return { authKey: result.getKey() }; } // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address2, signature, expiredAtEpoch) { - const request = new avs_pb.GetKeyReq(); - request.setOwner(address2); + async authWithSignature(address, signature, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); - let result = await this._callRPC( + let result = await this._callAnonRPC( "getKey", request ); - console.log("my key is ", result, result.getKey()); - this.authKey = result.getKey(); return { authKey: result.getKey() }; } _callRPC(method, request, options) { const metadata = _.cloneDeep(this.metadata); - console.log("my authkey", this.authkey); - if (!this.authKey) { - throw new Error("Not authenticated yet"); + if (!options?.authKey) { + throw new Error("missing auth header"); } metadata.set(AUTH_KEY_HEADER, options.authKey); return new Promise((resolve, reject) => { @@ -5340,10 +5545,11 @@ var BaseClient = class { }); } _callAnonRPC(method, request, options) { + const metadata = _.cloneDeep(this.metadata); return new Promise((resolve, reject) => { this.rpcClient[method].bind(this.rpcClient)( request, - this.metadata, + metadata, (error, response) => { if (error) reject(error); else resolve(response); @@ -5356,98 +5562,95 @@ var Client = class extends BaseClient { constructor(config) { super(config); } - async listSmartWallets() { - const request = new avs_pb.AddressRequest(); - request.setOwner(address); - const result = await this._callRPC("getSmartAccountAddress", request); - return { - owner: address, - wallets: result.getWalletsList() - }; + async listSmartWallets(options) { + const request = new avs_pb2.ListWalletReq(); + const result = await this._callRPC("listWallets", request, options); + return result.getWalletsList().map((item) => item.toObject()); } - async createTask({ - address: address2, - oracleContract, - tokenContract - }) { - const trigger = new avs_pb.TaskTrigger(); - trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); - trigger.setExpression( - new avs_pb.ExpressionCondition().setExpression(` - bigCmp( - priceChainlink("${oracleContract}"), - toBigInt("10000") - ) > 0`) - ); - const action = new avs_pb.TaskAction(); - action.setTaskType(avs_pb.TaskType.CONTRACTEXECUTIONTASK); - action.setId("transfer_erc20_1"); - action.setName("Transfer Test Token"); - const execution = new avs_pb.ContractExecution(); - execution.setContractAddress(tokenContract); - let ABI = ["function transfer(address to, uint amount)"]; - let iface = new ethers.Interface(ABI); - const callData = iface.encodeFunctionData("transfer", [ - address2, - ethers.parseUnits("12", 18) - ]); - execution.setCallData(callData); - action.setContractExecution(execution); - const request = new avs_pb.CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); - const result = await this._callRPC("createTask", request, { authKey }); + async createWallet({ + salt, + factoryAddress + }, options) { + const request = new avs_pb2.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + const result = await this._callRPC("createWallet", request, options); return { - id: result.getId() + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress() }; } - async listTasks(address2) { - const request = new avs_pb.ListTasksReq(); - const result = await this._callRPC("listTasks", request, { authKey }); - const tasks = _.map( - result.getTasksList(), - (obj) => { - return { - id: obj.getId(), - status: _.capitalize(obj.getStatus().toString()) - }; - } - ); - return { - tasks - }; + async createTask(payload, options) { + const request = new avs_pb2.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + request.setTrigger(buildTrigger(payload.trigger)); + let nodes = []; + for (const node of payload.nodes) { + const n = new avs_pb2.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else { + throw new Error("missing task payload"); + } + nodes.push(n); + request.addNodes(n); + } + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + const result = await this._callRPC("createTask", request, options); + return result.getId(); + } + async listTasks(address, options) { + const request = new avs_pb2.ListTasksReq(); + request.setSmartWalletAddress(address); + const result = await this._callRPC("listTasks", request, options); + return result.getTasksList().map((item) => new task_default(item)); } // TODO: specify the return type to match client’s requirements - // Right now we simply return the original object from the server - async getTask(id) { - const request = new avs_pb.UUID(); - request.setBytes(id); - ``; + async getTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "getTask", - request + request, + options ); return new task_default(result); } - async cancelTask(id) { - const request = new avs_pb.UUID(); - request.setBytes(id); + async cancelTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "cancelTask", - request + request, + options ); - return { - value: result.getValue() - }; + return result.getValue(); } - async deleteTask(id) { - const request = new avs_pb.UUID(); - request.setBytes(id); + async deleteTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "deleteTask", - request + request, + options ); - return { - value: result.getValue() - }; + return result.getValue(); } }; export { From 906793f193474a2cef56b2c160ae5a31d6e25794 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 02:38:57 -0800 Subject: [PATCH 30/51] fix all test --- tests/basic.test.ts | 25 ++++++++++++------------- tests/cancelTask.test.ts | 12 +++--------- tests/createTask.test.ts | 34 +++++++++++++++++----------------- tests/deleteTask.test.ts | 11 +++-------- tests/getTask.test.ts | 16 ++++++---------- tests/listTasks.test.ts | 8 ++------ 6 files changed, 43 insertions(+), 63 deletions(-) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 22f9bd1..fb37fff 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -123,7 +123,7 @@ describe("Client E2E Tests", () => { const result = await client.createWallet({salt: "123"}, { authKey }); expect(result?.address).toHaveLength(42); expect(result?.salt).toEqual("123"); - expect(result?.factoryAddress).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + expect(result?.factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); }); test("listSmartWallets", async () => { @@ -139,15 +139,14 @@ describe("Client E2E Tests", () => { const result = await client.createTask(sampleTask1, { authKey }); expect(result).toBeDefined(); - expect(result).toHaveProperty("id"); - expect(result.id).toHaveLength(26); + expect(result).toHaveLength(26); }); test("getTask", async () => { const result = await client.createTask(sampleTask1, { authKey }); - expect(result?.id).toHaveLength(26); + expect(result).toHaveLength(26); - const task = await client.getTask(result.id, { authKey }); + const task = await client.getTask(result, { authKey }); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); @@ -169,20 +168,20 @@ describe("Client E2E Tests", () => { expect(tasks1.length).toBeGreaterThanOrEqual(1); expect(tasks2.length).toBeGreaterThanOrEqual(1); - const task1 = tasks1.find(t => t.id == result1.id); - expect(tasks1.find(t => t.id == result2.id)).toBe(undefined); - expect(task1?.id).toEqual(result1.id); + const task1 = tasks1.find(t => t.id == result1); + expect(tasks1.find(t => t.id == result2)).toBe(undefined); + expect(task1?.id).toEqual(result1); expect(task1?.memo).toEqual('task1 test'); - const task2 = tasks2.find(t => t.id == result2.id); - expect(tasks2.find(t => t.id == result1.id)).toBe(undefined); - expect(task2?.id).toEqual(result2.id); + const task2 = tasks2.find(t => t.id == result2); + expect(tasks2.find(t => t.id == result1)).toBe(undefined); + expect(task2?.id).toEqual(result2); expect(task2?.memo).toEqual('default wallet test'); }); test("cancelTask", async () => { const result = await client.createTask(sampleTask1, { authKey }); - const task = await client.getTask(result.id, { authKey }); + const task = await client.getTask(result, { authKey }); expect(task.status).toEqual( avs_pb.TaskStatus.ACTIVE); const cancelResult = await client.cancelTask(task.id, { authKey }); @@ -193,7 +192,7 @@ describe("Client E2E Tests", () => { test("deleteTask", async () => { const result = await client.createTask(sampleTask1, { authKey }); - const task = await client.getTask(result.id, { authKey }); + const task = await client.getTask(result, { authKey }); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.id).toHaveLength(26); diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 6bc13c7..3f39c98 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -61,12 +61,10 @@ describe("cancelTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should cancel task when authenticated with signature", async () => { @@ -101,12 +99,10 @@ describe("cancelTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should cancel task when authenticated with API key", async () => { @@ -145,15 +141,13 @@ describe("cancelTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should throw error when canceling a task without authentication", async () => { diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index b6437c0..77afa3f 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -66,7 +66,7 @@ describe("createTask Tests", () => { ); console.log("Create task result:", result); expect(result).toBeDefined(); - expect(result).toHaveProperty("id"); + expect(result).toHaveLength(26); }); test("should throw error when creating a task with owner address using signature", async () => { @@ -89,14 +89,14 @@ describe("createTask Tests", () => { { authKey } ); - const task = await client.getTask(result.id, { authKey }); - expect(task.id).toEqual(result.id); + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.CRON); + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.CRON); expect(task.trigger.cron.schedule[0]).toEqual("5 4 * * *"); expect(task.trigger.cron.schedule[1]).toEqual("5 0 * 8 *"); }); @@ -114,14 +114,14 @@ describe("createTask Tests", () => { { authKey } ); - const task = await client.getTask(result.id, { authKey }); - expect(task.id).toEqual(result.id); + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME); + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME); expect(task.trigger.fixedTime.epochs).toEqual([10, 20, 30]); }); @@ -138,14 +138,14 @@ describe("createTask Tests", () => { { authKey } ); - const task = await client.getTask(result.id, { authKey }); - expect(task.id).toEqual(result.id); + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.EVENT); + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.EVENT); expect(task.trigger.event.expression).toEqual(`topic0 == "0x123" && topic2 == "0xdef"` ); }); @@ -162,14 +162,14 @@ describe("createTask Tests", () => { { authKey } ); - const task = await client.getTask(result.id, { authKey }); - expect(task.id).toEqual(result.id); + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.MANUAL); + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.MANUAL); expect(task.trigger.manual).toBe(true); }); @@ -188,14 +188,14 @@ describe("createTask Tests", () => { { authKey } ); - const task = await client.getTask(result.id, { authKey }); - expect(task.id).toEqual(result.id); + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); - expect(task.trigger.trigger_type).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); expect(task.trigger.block.interval).toEqual(102); }); @@ -223,7 +223,7 @@ describe("createTask Tests", () => { ); console.log("Create task result:", result); expect(result).toBeDefined(); - expect(result).toHaveProperty("id"); + expect(result).toHaveLength(26); }); test("should throw error when creating a task with owner address using API key", async () => { diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index e416310..62cda7f 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -60,12 +60,10 @@ describe("deleteTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should delete task when authenticated with signature", async () => { @@ -103,12 +101,11 @@ describe("deleteTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - createdTaskId = createTaskRes.id; console.log("crate task", createdTaskId); }); @@ -152,12 +149,10 @@ describe("deleteTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should throw error when deleting a task without authentication", async () => { diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index 18ab17f..ca41400 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -61,14 +61,12 @@ describe("getTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should get task when authenticated with signature", async () => { @@ -106,23 +104,23 @@ describe("getTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should get task when authenticated with API key", async () => { const result = await client.getTask(createdTaskId, { authKey }); + console.log("trask is ", result); // Check if the result is an object and has the expected properties expect(result).toBeDefined(); expect(result.status).toBe(avs_pb.TaskStatus.ACTIVE); expect(result.id).toBe(createdTaskId); expect(result.smartWalletAddress).toEqual(smartWalletAddress); - //expect(result.trigger).toBeDefined(); + expect(result.trigger).toBeDefined(); + expect(result.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); expect(result.nodes).toHaveLength(1); expect(result.expiredAt).toEqual(sampleTask1.expiredAt); expect(result.memo).toEqual(sampleTask1.memo); @@ -154,12 +152,10 @@ describe("getTask Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should throw error when getting a task without authentication", async () => { diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index 307b73a..9e23fe7 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -60,12 +60,10 @@ describe("listTasks Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should list tasks when authenticated with signature", async () => { @@ -102,12 +100,10 @@ describe("listTasks Tests", () => { console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { ...sampleTask1, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should list tasks when authenticated with API key", async () => { From 200ef710c461d8080cd5373fc7881d7ff8dcc15d Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 03:57:28 -0800 Subject: [PATCH 31/51] completed all node type --- dist/index.d.mts | 49 ++++++++++-------- dist/index.d.ts | 49 ++++++++++-------- dist/index.js | 100 +++++++++++++++++++++++++++++------ dist/index.mjs | 100 +++++++++++++++++++++++++++++------ src/builder.ts | 85 +++++++++++++++++++++++++++++- src/index.ts | 28 +--------- src/task.ts | 16 ++++-- src/types.ts | 17 ++++-- tests/createTask.test.ts | 31 ++++++++++- tests/fixture.ts | 109 +++++++++++++++++++++++++++++++++++++++ 10 files changed, 473 insertions(+), 111 deletions(-) diff --git a/dist/index.d.mts b/dist/index.d.mts index 1435a0b..c5e787d 100644 --- a/dist/index.d.mts +++ b/dist/index.d.mts @@ -694,25 +694,25 @@ declare namespace TaskNode { } -declare class Execution extends jspb.Message { +declare class Execution$1 extends jspb.Message { getEpoch(): number; - setEpoch(value: number): Execution; + setEpoch(value: number): Execution$1; getUserOpHash(): string; - setUserOpHash(value: string): Execution; + setUserOpHash(value: string): Execution$1; getError(): string; - setError(value: string): Execution; + setError(value: string): Execution$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; + toObject(includeInstance?: boolean): Execution$1.AsObject; + static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; + static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution$1; + static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; } -declare namespace Execution { +declare namespace Execution$1 { export type AsObject = { epoch: number, userOpHash: string, @@ -753,9 +753,9 @@ declare class Task$1 extends jspb.Message { setEdgesList(value: Array): Task$1; addEdges(value?: TaskEdge, index?: number): TaskEdge; clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task$1; - addExecutions(value?: Execution, index?: number): Execution; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution$1, index?: number): Execution$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Task$1.AsObject; @@ -781,7 +781,7 @@ declare namespace Task$1 { trigger?: TaskTrigger$1.AsObject, nodesList: Array, edgesList: Array, - executionsList: Array, + executionsList: Array, } } @@ -1282,21 +1282,22 @@ interface TaskType { taskType: number; id: string; name: string; - nextList: any[]; ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; customCode?: any; branch?: any; + filter?: any; }>; + edges: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; status: number; maxExecution: number; - executionsList: any[]; + executions: Execution[]; } interface CreateTaskResponse { id: string; @@ -1322,6 +1323,11 @@ interface CreateWalletReq { salt: string; factoryAddress?: string; } +interface Execution { + epoch: number; + userOpHash: string; + error: string; +} declare class Task implements TaskType { id: string; @@ -1330,12 +1336,13 @@ declare class Task implements TaskType { smartWalletAddress: string; trigger: TaskTrigger; nodes: any[]; + edges: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; maxExecution: number; - executionsList: any[]; + executions: Execution[]; constructor(task: Task$1); } @@ -1361,4 +1368,4 @@ declare class Client extends BaseClient { deleteTask(id: string, options: RequestOptions): Promise; } -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts index 1435a0b..c5e787d 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -694,25 +694,25 @@ declare namespace TaskNode { } -declare class Execution extends jspb.Message { +declare class Execution$1 extends jspb.Message { getEpoch(): number; - setEpoch(value: number): Execution; + setEpoch(value: number): Execution$1; getUserOpHash(): string; - setUserOpHash(value: string): Execution; + setUserOpHash(value: string): Execution$1; getError(): string; - setError(value: string): Execution; + setError(value: string): Execution$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; + toObject(includeInstance?: boolean): Execution$1.AsObject; + static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; + static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution$1; + static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; } -declare namespace Execution { +declare namespace Execution$1 { export type AsObject = { epoch: number, userOpHash: string, @@ -753,9 +753,9 @@ declare class Task$1 extends jspb.Message { setEdgesList(value: Array): Task$1; addEdges(value?: TaskEdge, index?: number): TaskEdge; clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task$1; - addExecutions(value?: Execution, index?: number): Execution; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution$1, index?: number): Execution$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): Task$1.AsObject; @@ -781,7 +781,7 @@ declare namespace Task$1 { trigger?: TaskTrigger$1.AsObject, nodesList: Array, edgesList: Array, - executionsList: Array, + executionsList: Array, } } @@ -1282,21 +1282,22 @@ interface TaskType { taskType: number; id: string; name: string; - nextList: any[]; ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; customCode?: any; branch?: any; + filter?: any; }>; + edges: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; status: number; maxExecution: number; - executionsList: any[]; + executions: Execution[]; } interface CreateTaskResponse { id: string; @@ -1322,6 +1323,11 @@ interface CreateWalletReq { salt: string; factoryAddress?: string; } +interface Execution { + epoch: number; + userOpHash: string; + error: string; +} declare class Task implements TaskType { id: string; @@ -1330,12 +1336,13 @@ declare class Task implements TaskType { smartWalletAddress: string; trigger: TaskTrigger; nodes: any[]; + edges: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; maxExecution: number; - executionsList: any[]; + executions: Execution[]; constructor(task: Task$1); } @@ -1361,4 +1368,4 @@ declare class Client extends BaseClient { deleteTask(id: string, options: RequestOptions): Promise; } -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.js b/dist/index.js index 642fbcc..0b04d1f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5365,6 +5365,41 @@ var buildContractRead = ({ contract_ddress, callData, contractABI }) => { } return n; }; +var buildGraphQL = ({ url, query, variables }) => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k, v] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); + } + return n; +}; +var buildRestAPI = ({ url, body, method, headers }) => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k, v] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); + } + return n; +}; +var buildBranch = ({ conditions }) => { + const n = new avs_pb.BranchNode(); + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + n.addConditions(condition); + } + return n; +}; +var buildFilter = ({ expression }) => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +}; var buildTaskEdge = ({ id, source, target }) => { const edge = new avs_pb.TaskEdge(); edge.setId(id); @@ -5372,6 +5407,36 @@ var buildTaskEdge = ({ id, source, target }) => { edge.setTarget(target); return edge; }; +var buildTaskNode = (node) => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode(); + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + return n; +}; var buildTrigger = (payload) => { const trigger = new avs_pb.TaskTrigger(); for (const [key, value] of Object.entries(payload)) { @@ -5454,7 +5519,9 @@ var nodeFromGRPC = (node) => { standarize.restApi = base.restApi; break; case avs_pb.TaskNode.TaskTypeCase.BRANCH: - standarize.branch = base.branch; + standarize.branch = { + conditions: base.branch.conditionsList + }; break; case avs_pb.TaskNode.TaskTypeCase.FILTER: standarize.filter = base.filter; @@ -5468,6 +5535,13 @@ var nodeFromGRPC = (node) => { } return standarize; }; +var taskEdgeFromGRPC = (edge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget() + }; +}; // src/task.ts var Task = class { @@ -5478,12 +5552,19 @@ var Task = class { this.smartWalletAddress = task.getSmartWalletAddress(); this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.executionsList = task.getExecutionsList(); + this.executions = task.getExecutionsList().map((execution) => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError() + }; + }); this.maxExecution = task.getMaxExecution(); } }; @@ -5598,21 +5679,8 @@ var Client = class extends BaseClient { request.setMemo(payload.memo || ""); request.setMaxExecution(payload.maxExecution || 0); request.setTrigger(buildTrigger(payload.trigger)); - let nodes = []; for (const node of payload.nodes) { - const n = new avs_pb2.TaskNode(); - n.setId(node.id); - n.setName(node.name); - if (node.ethTransfer) { - } else if (node.contractWrite) { - n.setContractWrite(buildContractWrite(node.contractWrite)); - } else if (node.contractRead) { - n.setContractRead(buildContractRead(node.contractRead)); - } else { - throw new Error("missing task payload"); - } - nodes.push(n); - request.addNodes(n); + request.addNodes(buildTaskNode(node)); } const edges = []; for (const edge of payload.edges) { diff --git a/dist/index.mjs b/dist/index.mjs index a363dac..b0b0208 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -5358,6 +5358,41 @@ var buildContractRead = ({ contract_ddress, callData, contractABI }) => { } return n; }; +var buildGraphQL = ({ url, query, variables }) => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k, v] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); + } + return n; +}; +var buildRestAPI = ({ url, body, method, headers }) => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k, v] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); + } + return n; +}; +var buildBranch = ({ conditions }) => { + const n = new avs_pb.BranchNode(); + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + n.addConditions(condition); + } + return n; +}; +var buildFilter = ({ expression }) => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +}; var buildTaskEdge = ({ id, source, target }) => { const edge = new avs_pb.TaskEdge(); edge.setId(id); @@ -5365,6 +5400,36 @@ var buildTaskEdge = ({ id, source, target }) => { edge.setTarget(target); return edge; }; +var buildTaskNode = (node) => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode(); + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + return n; +}; var buildTrigger = (payload) => { const trigger = new avs_pb.TaskTrigger(); for (const [key, value] of Object.entries(payload)) { @@ -5447,7 +5512,9 @@ var nodeFromGRPC = (node) => { standarize.restApi = base.restApi; break; case avs_pb.TaskNode.TaskTypeCase.BRANCH: - standarize.branch = base.branch; + standarize.branch = { + conditions: base.branch.conditionsList + }; break; case avs_pb.TaskNode.TaskTypeCase.FILTER: standarize.filter = base.filter; @@ -5461,6 +5528,13 @@ var nodeFromGRPC = (node) => { } return standarize; }; +var taskEdgeFromGRPC = (edge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget() + }; +}; // src/task.ts var Task = class { @@ -5471,12 +5545,19 @@ var Task = class { this.smartWalletAddress = task.getSmartWalletAddress(); this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.executionsList = task.getExecutionsList(); + this.executions = task.getExecutionsList().map((execution) => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError() + }; + }); this.maxExecution = task.getMaxExecution(); } }; @@ -5591,21 +5672,8 @@ var Client = class extends BaseClient { request.setMemo(payload.memo || ""); request.setMaxExecution(payload.maxExecution || 0); request.setTrigger(buildTrigger(payload.trigger)); - let nodes = []; for (const node of payload.nodes) { - const n = new avs_pb2.TaskNode(); - n.setId(node.id); - n.setName(node.name); - if (node.ethTransfer) { - } else if (node.contractWrite) { - n.setContractWrite(buildContractWrite(node.contractWrite)); - } else if (node.contractRead) { - n.setContractRead(buildContractRead(node.contractRead)); - } else { - throw new Error("missing task payload"); - } - nodes.push(n); - request.addNodes(n); + request.addNodes(buildTaskNode(node)); } const edges = []; for (const edge of payload.edges) { diff --git a/src/builder.ts b/src/builder.ts index e8cd6d5..edd6c1b 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -28,6 +28,48 @@ export const buildContractRead = ({contract_ddress, callData, contractABI}): avs return n; } +export const buildGraphQL = ({url, query, variables}): avs_pb.GraphQLQueryNode => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k,v ] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); + } + return n; +} + +export const buildRestAPI = ({url, body, method, headers}): avs_pb.RestAPINode => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k,v ] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); + } + + return n; +} + +export const buildBranch = ({conditions}): avs_pb.BranchNode => { + const n = new avs_pb.BranchNode(); + + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + + n.addConditions(condition); + } + return n; +} + +export const buildFilter = ({expression}): avs_pb.FilterNode => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +} + export const buildTaskEdge = ({id, source, target}): avs_pb.TaskEdge => { const edge = new avs_pb.TaskEdge(); edge.setId(id); @@ -37,6 +79,37 @@ export const buildTaskEdge = ({id, source, target}): avs_pb.TaskEdge => { return edge; } +export const buildTaskNode = (node): avs_pb.TaskNode => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode; + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + return n +} export const buildTrigger = (payload): avs_pb.TaskTrigger => { const trigger = new avs_pb.TaskTrigger(); @@ -135,7 +208,9 @@ export const nodeFromGRPC = (node) => { standarize.restApi = base.restApi; break; case avs_pb.TaskNode.TaskTypeCase.BRANCH: - standarize.branch = base.branch; + standarize.branch = { + conditions: base.branch.conditionsList, + } break; case avs_pb.TaskNode.TaskTypeCase.FILTER: standarize.filter = base.filter; @@ -150,3 +225,11 @@ export const nodeFromGRPC = (node) => { return standarize; } + +export const taskEdgeFromGRPC = (edge: avs_pb.TaskEdge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget(), + } +} diff --git a/src/index.ts b/src/index.ts index 78b36fe..7cbbc25 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,6 +26,7 @@ import { buildContractWrite, buildTaskEdge, buildTrigger, + buildTaskNode, } from "./builder"; class BaseClient { @@ -202,33 +203,8 @@ export default class Client extends BaseClient { request.setTrigger(buildTrigger(payload.trigger)); - let nodes = []; for (const node of payload.nodes) { - const n = new avs_pb.TaskNode(); - n.setId(node.id); - n.setName(node.name); - - if (node.ethTransfer) { - // n.setEthTransfer(node.ethTransfer); - } else if (node.contractWrite) { - n.setContractWrite(buildContractWrite(node.contractWrite)); - } else if (node.contractRead) { - n.setContractRead(buildContractRead(node.contractRead)); - // } else if (node.graphqlDataQuery) { - // n.setGraphqlDataQuery(node.graphqlDataQuery); - // } else if (node.restApi) { - // n.setRestApi(node.restApi); - //} else if (node.branch) { - // n.setBranch(node.branch); - //} else if (node["filter"]) { - // n.setfilter(node["filter"]); - //} else if (node.customCode) { - // n.setCustomCode(node.customCode); - } else { - throw new Error("missing task payload"); - } - nodes.push(n); - request.addNodes(n); + request.addNodes(buildTaskNode(node)); } const edges = []; diff --git a/src/task.ts b/src/task.ts index ccdac79..65f8667 100644 --- a/src/task.ts +++ b/src/task.ts @@ -1,6 +1,6 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; -import { TaskType, TaskTrigger } from "./types"; -import { triggerFromGRPC, nodeFromGRPC } from "./builder"; +import { TaskType, TaskTrigger, Execution } from "./types"; +import { triggerFromGRPC, nodeFromGRPC, taskEdgeFromGRPC } from "./builder"; class Task implements TaskType { id: string; @@ -9,12 +9,13 @@ class Task implements TaskType { smartWalletAddress: string; trigger: TaskTrigger; nodes: any[]; + edges: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; maxExecution: number; - executionsList: any[]; + executions: Execution[]; constructor(task: avs_pb.Task) { this.id = task.getId() || ""; @@ -23,12 +24,19 @@ class Task implements TaskType { this.smartWalletAddress = task.getSmartWalletAddress(); this.nodes = task.getNodesList().map(node => nodeFromGRPC(node)); this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map(edge => taskEdgeFromGRPC(edge)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.executionsList = task.getExecutionsList(); + this.executions = task.getExecutionsList().map(execution => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError(), + } + }); this.maxExecution = task.getMaxExecution(); } } diff --git a/src/types.ts b/src/types.ts index d8f8061..99957cd 100644 --- a/src/types.ts +++ b/src/types.ts @@ -43,21 +43,22 @@ export interface TaskType { taskType: number; id: string; name: string; - nextList: any[]; ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; customCode?: any; branch?: any; + filter?: any; }>; + edges: any[]; startAt: number; expiredAt: number; memo: string; completedAt: number; status: number; maxExecution: number; - executionsList: any[]; + executions: Execution[]; } export interface CreateTaskResponse { @@ -88,4 +89,10 @@ export interface SmartWallet { export interface CreateWalletReq { salt: string; factoryAddress?: string; +} + +export interface Execution { + epoch: number; + userOpHash: string; + error: string; } \ No newline at end of file diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index 77afa3f..f4961e4 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1, sampleTask2, TEST_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -199,6 +199,35 @@ describe("createTask Tests", () => { expect(task.trigger.block.interval).toEqual(102); }); + test("create complex task with multi nodes and edge ", async() => { + const result = await client.createTask( + { + ...sampleTask2, + smartWalletAddress, + }, + { authKey }); + + const task = await client.getTask(result, { authKey }); + + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(6); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + + expect(task.nodes[5].branch.conditions).toHaveLength(3); + expect(task.nodes[5].branch.conditions[0].type).toEqual("if"); + expect(task.nodes[5].branch.conditions[1].type).toEqual("if"); + expect(task.nodes[5].branch.conditions[2].type).toEqual("else"); + + expect(task.edges).toHaveLength(6); + expect(task.edges[3].source).toEqual("t100.b1"); + expect(task.edges[4].source).toEqual("t100.b2"); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); + expect(task.trigger.block.interval).toEqual(5); + + }) }); describe("Auth with API key", () => { diff --git a/tests/fixture.ts b/tests/fixture.ts index 828e35e..714bd2c 100644 --- a/tests/fixture.ts +++ b/tests/fixture.ts @@ -33,4 +33,113 @@ export const sampleTask1 = { }], }; +export const sampleTask2 = { + smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', + startAt: Math.floor(Date.now() / 1000) + 30, + expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), + memo: `Test task`, + + trigger: { + block: { + interval: 5, // run every 5 block + }, + }, + nodes: [ + { + // id need to be unique. it will be assign to the variable + id: "t000", + // name is for our note only. use for display a humand friendly version + name: 'transfer token', + contractWrite: { + contractAddress: "0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b", + callData: "0x123cdef", + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t001", + // name is for our note only. use for display a humand friendly version + name: "send eth", + ethTransfer: { + destination: "0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b", + amount: "0x123cdef", + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t002", + // name is for our note only. use for display a humand friendly version + name: 'make rest call', + restApi: { + url: "http://endpoint002", + method: "post", + body: `{"a":1}`, + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t003", + // name is for our note only. use for display a humand friendly version + name: 'make graphql call', + graphqlDataQuery: { + url: "http://endpoint003", + query: `foo bar`, + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t004", + // name is for our note only. use for display a humand friendly version + name: 'make graphql call 2', + graphqlDataQuery: { + url: "http://endpoint004", + query: `other test`, + } + }, + { + id: "t100", + name: "branch ", + branch: { + conditions: [ + { id: "b1", type: "if", expression: "foo >= 5" }, + { id: "b2", type: "if", expression: "foo <= -1" }, + { id: "b3", type: "else" } + ] + } + }, + ], + edges: [ + { + id: UlidMonotonic.generate().toCanonical(), + source: "__TRIGGER__", + target: "t000", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t000", + target: "t001", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t001", + target: "t100", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t100.b1", + target: "t002", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t100.b2", + target: "t003", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t100.b3", + target: "t004", + }, + ], +}; + From 77d66cead5dee32c193fbcd6082802aa6ffe50a8 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 04:32:51 -0800 Subject: [PATCH 32/51] update type --- dist/index.d.mts | 128 +++++++++++++++++++++++++---------------------- dist/index.d.ts | 128 +++++++++++++++++++++++++---------------------- src/builder.ts | 6 +-- src/task.ts | 6 +-- src/types.ts | 34 ++++++++----- 5 files changed, 161 insertions(+), 141 deletions(-) diff --git a/dist/index.d.mts b/dist/index.d.mts index c5e787d..b7d14e6 100644 --- a/dist/index.d.mts +++ b/dist/index.d.mts @@ -575,25 +575,25 @@ declare namespace LoopNode { } } -declare class TaskEdge extends jspb.Message { +declare class TaskEdge$1 extends jspb.Message { getId(): string; - setId(value: string): TaskEdge; + setId(value: string): TaskEdge$1; getSource(): string; - setSource(value: string): TaskEdge; + setSource(value: string): TaskEdge$1; getTarget(): string; - setTarget(value: string): TaskEdge; + setTarget(value: string): TaskEdge$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskEdge.AsObject; - static toObject(includeInstance: boolean, msg: TaskEdge): TaskEdge.AsObject; + toObject(includeInstance?: boolean): TaskEdge$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskEdge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskEdge; - static deserializeBinaryFromReader(message: TaskEdge, reader: jspb.BinaryReader): TaskEdge; + static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge$1; + static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; } -declare namespace TaskEdge { +declare namespace TaskEdge$1 { export type AsObject = { id: string, source: string, @@ -601,70 +601,70 @@ declare namespace TaskEdge { } } -declare class TaskNode extends jspb.Message { +declare class TaskNode$1 extends jspb.Message { getId(): string; - setId(value: string): TaskNode; + setId(value: string): TaskNode$1; getName(): string; - setName(value: string): TaskNode; + setName(value: string): TaskNode$1; hasEthTransfer(): boolean; clearEthTransfer(): void; getEthTransfer(): ETHTransferNode | undefined; - setEthTransfer(value?: ETHTransferNode): TaskNode; + setEthTransfer(value?: ETHTransferNode): TaskNode$1; hasContractWrite(): boolean; clearContractWrite(): void; getContractWrite(): ContractWriteNode | undefined; - setContractWrite(value?: ContractWriteNode): TaskNode; + setContractWrite(value?: ContractWriteNode): TaskNode$1; hasContractRead(): boolean; clearContractRead(): void; getContractRead(): ContractReadNode | undefined; - setContractRead(value?: ContractReadNode): TaskNode; + setContractRead(value?: ContractReadNode): TaskNode$1; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; getGraphqlDataQuery(): GraphQLQueryNode | undefined; - setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; hasRestApi(): boolean; clearRestApi(): void; getRestApi(): RestAPINode | undefined; - setRestApi(value?: RestAPINode): TaskNode; + setRestApi(value?: RestAPINode): TaskNode$1; hasBranch(): boolean; clearBranch(): void; getBranch(): BranchNode | undefined; - setBranch(value?: BranchNode): TaskNode; + setBranch(value?: BranchNode): TaskNode$1; hasFilter(): boolean; clearFilter(): void; getFilter(): FilterNode | undefined; - setFilter(value?: FilterNode): TaskNode; + setFilter(value?: FilterNode): TaskNode$1; hasLoop(): boolean; clearLoop(): void; getLoop(): LoopNode | undefined; - setLoop(value?: LoopNode): TaskNode; + setLoop(value?: LoopNode): TaskNode$1; hasCustomCode(): boolean; clearCustomCode(): void; getCustomCode(): CustomCodeNode | undefined; - setCustomCode(value?: CustomCodeNode): TaskNode; + setCustomCode(value?: CustomCodeNode): TaskNode$1; - getTaskTypeCase(): TaskNode.TaskTypeCase; + getTaskTypeCase(): TaskNode$1.TaskTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskNode.AsObject; - static toObject(includeInstance: boolean, msg: TaskNode): TaskNode.AsObject; + toObject(includeInstance?: boolean): TaskNode$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskNode; - static deserializeBinaryFromReader(message: TaskNode, reader: jspb.BinaryReader): TaskNode; + static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode$1; + static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; } -declare namespace TaskNode { +declare namespace TaskNode$1 { export type AsObject = { id: string, name: string, @@ -745,13 +745,13 @@ declare class Task$1 extends jspb.Message { getTrigger(): TaskTrigger$1 | undefined; setTrigger(value?: TaskTrigger$1): Task$1; clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task$1; - addNodes(value?: TaskNode, index?: number): TaskNode; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): Task$1; - addEdges(value?: TaskEdge, index?: number): TaskEdge; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; clearExecutionsList(): void; getExecutionsList(): Array; setExecutionsList(value: Array): Task$1; @@ -779,8 +779,8 @@ declare namespace Task$1 { maxExecution: number, status: TaskStatus, trigger?: TaskTrigger$1.AsObject, - nodesList: Array, - edgesList: Array, + nodesList: Array, + edgesList: Array, executionsList: Array, } } @@ -802,13 +802,13 @@ declare class CreateTaskReq extends jspb.Message { getMemo(): string; setMemo(value: string): CreateTaskReq; clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): CreateTaskReq; - addNodes(value?: TaskNode, index?: number): TaskNode; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): CreateTaskReq; - addEdges(value?: TaskEdge, index?: number): TaskEdge; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateTaskReq.AsObject; @@ -828,8 +828,8 @@ declare namespace CreateTaskReq { maxExecution: number, smartWalletAddress: string, memo: string, - nodesList: Array, - edgesList: Array, + nodesList: Array, + edgesList: Array, } } @@ -1273,24 +1273,25 @@ interface TaskTrigger { interval: number; }; } +interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} interface TaskType { id: string; owner: string; smartWalletAddress: string; trigger: TaskTrigger; - nodes: Array<{ - taskType: number; - id: string; - name: string; - ethTransfer?: any; - contractWrite?: any; - contractRead?: any; - restApi?: any; - customCode?: any; - branch?: any; - filter?: any; - }>; - edges: any[]; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; @@ -1328,6 +1329,11 @@ interface Execution { userOpHash: string; error: string; } +interface TaskEdge { + id: string; + source: string; + target: string; +} declare class Task implements TaskType { id: string; @@ -1335,8 +1341,8 @@ declare class Task implements TaskType { owner: string; smartWalletAddress: string; trigger: TaskTrigger; - nodes: any[]; - edges: any[]; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; @@ -1368,4 +1374,4 @@ declare class Client extends BaseClient { deleteTask(id: string, options: RequestOptions): Promise; } -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts index c5e787d..b7d14e6 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -575,25 +575,25 @@ declare namespace LoopNode { } } -declare class TaskEdge extends jspb.Message { +declare class TaskEdge$1 extends jspb.Message { getId(): string; - setId(value: string): TaskEdge; + setId(value: string): TaskEdge$1; getSource(): string; - setSource(value: string): TaskEdge; + setSource(value: string): TaskEdge$1; getTarget(): string; - setTarget(value: string): TaskEdge; + setTarget(value: string): TaskEdge$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskEdge.AsObject; - static toObject(includeInstance: boolean, msg: TaskEdge): TaskEdge.AsObject; + toObject(includeInstance?: boolean): TaskEdge$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskEdge, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskEdge; - static deserializeBinaryFromReader(message: TaskEdge, reader: jspb.BinaryReader): TaskEdge; + static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge$1; + static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; } -declare namespace TaskEdge { +declare namespace TaskEdge$1 { export type AsObject = { id: string, source: string, @@ -601,70 +601,70 @@ declare namespace TaskEdge { } } -declare class TaskNode extends jspb.Message { +declare class TaskNode$1 extends jspb.Message { getId(): string; - setId(value: string): TaskNode; + setId(value: string): TaskNode$1; getName(): string; - setName(value: string): TaskNode; + setName(value: string): TaskNode$1; hasEthTransfer(): boolean; clearEthTransfer(): void; getEthTransfer(): ETHTransferNode | undefined; - setEthTransfer(value?: ETHTransferNode): TaskNode; + setEthTransfer(value?: ETHTransferNode): TaskNode$1; hasContractWrite(): boolean; clearContractWrite(): void; getContractWrite(): ContractWriteNode | undefined; - setContractWrite(value?: ContractWriteNode): TaskNode; + setContractWrite(value?: ContractWriteNode): TaskNode$1; hasContractRead(): boolean; clearContractRead(): void; getContractRead(): ContractReadNode | undefined; - setContractRead(value?: ContractReadNode): TaskNode; + setContractRead(value?: ContractReadNode): TaskNode$1; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; getGraphqlDataQuery(): GraphQLQueryNode | undefined; - setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; hasRestApi(): boolean; clearRestApi(): void; getRestApi(): RestAPINode | undefined; - setRestApi(value?: RestAPINode): TaskNode; + setRestApi(value?: RestAPINode): TaskNode$1; hasBranch(): boolean; clearBranch(): void; getBranch(): BranchNode | undefined; - setBranch(value?: BranchNode): TaskNode; + setBranch(value?: BranchNode): TaskNode$1; hasFilter(): boolean; clearFilter(): void; getFilter(): FilterNode | undefined; - setFilter(value?: FilterNode): TaskNode; + setFilter(value?: FilterNode): TaskNode$1; hasLoop(): boolean; clearLoop(): void; getLoop(): LoopNode | undefined; - setLoop(value?: LoopNode): TaskNode; + setLoop(value?: LoopNode): TaskNode$1; hasCustomCode(): boolean; clearCustomCode(): void; getCustomCode(): CustomCodeNode | undefined; - setCustomCode(value?: CustomCodeNode): TaskNode; + setCustomCode(value?: CustomCodeNode): TaskNode$1; - getTaskTypeCase(): TaskNode.TaskTypeCase; + getTaskTypeCase(): TaskNode$1.TaskTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskNode.AsObject; - static toObject(includeInstance: boolean, msg: TaskNode): TaskNode.AsObject; + toObject(includeInstance?: boolean): TaskNode$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskNode; - static deserializeBinaryFromReader(message: TaskNode, reader: jspb.BinaryReader): TaskNode; + static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode$1; + static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; } -declare namespace TaskNode { +declare namespace TaskNode$1 { export type AsObject = { id: string, name: string, @@ -745,13 +745,13 @@ declare class Task$1 extends jspb.Message { getTrigger(): TaskTrigger$1 | undefined; setTrigger(value?: TaskTrigger$1): Task$1; clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task$1; - addNodes(value?: TaskNode, index?: number): TaskNode; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): Task$1; - addEdges(value?: TaskEdge, index?: number): TaskEdge; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; clearExecutionsList(): void; getExecutionsList(): Array; setExecutionsList(value: Array): Task$1; @@ -779,8 +779,8 @@ declare namespace Task$1 { maxExecution: number, status: TaskStatus, trigger?: TaskTrigger$1.AsObject, - nodesList: Array, - edgesList: Array, + nodesList: Array, + edgesList: Array, executionsList: Array, } } @@ -802,13 +802,13 @@ declare class CreateTaskReq extends jspb.Message { getMemo(): string; setMemo(value: string): CreateTaskReq; clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): CreateTaskReq; - addNodes(value?: TaskNode, index?: number): TaskNode; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): CreateTaskReq; - addEdges(value?: TaskEdge, index?: number): TaskEdge; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateTaskReq.AsObject; @@ -828,8 +828,8 @@ declare namespace CreateTaskReq { maxExecution: number, smartWalletAddress: string, memo: string, - nodesList: Array, - edgesList: Array, + nodesList: Array, + edgesList: Array, } } @@ -1273,24 +1273,25 @@ interface TaskTrigger { interval: number; }; } +interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} interface TaskType { id: string; owner: string; smartWalletAddress: string; trigger: TaskTrigger; - nodes: Array<{ - taskType: number; - id: string; - name: string; - ethTransfer?: any; - contractWrite?: any; - contractRead?: any; - restApi?: any; - customCode?: any; - branch?: any; - filter?: any; - }>; - edges: any[]; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; @@ -1328,6 +1329,11 @@ interface Execution { userOpHash: string; error: string; } +interface TaskEdge { + id: string; + source: string; + target: string; +} declare class Task implements TaskType { id: string; @@ -1335,8 +1341,8 @@ declare class Task implements TaskType { owner: string; smartWalletAddress: string; trigger: TaskTrigger; - nodes: any[]; - edges: any[]; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; @@ -1368,4 +1374,4 @@ declare class Client extends BaseClient { deleteTask(id: string, options: RequestOptions): Promise; } -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/src/builder.ts b/src/builder.ts index edd6c1b..b178959 100644 --- a/src/builder.ts +++ b/src/builder.ts @@ -1,7 +1,7 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { - TaskTrigger + TaskTrigger, TaskEdge } from "./types"; export const buildContractWrite = ({contractAddress, callData, contractABI}): avs_pb.ContractWriteNode => { @@ -185,7 +185,7 @@ export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger | undefined): TaskTr return base; } -export const nodeFromGRPC = (node) => { +export const nodeFromGRPC = (node): TaskNode => { const base = node.toObject(); const standarize = { taskType: node.getTaskTypeCase() @@ -226,7 +226,7 @@ export const nodeFromGRPC = (node) => { return standarize; } -export const taskEdgeFromGRPC = (edge: avs_pb.TaskEdge) => { +export const taskEdgeFromGRPC = (edge: avs_pb.TaskEdge): TaskEdge => { return { id: edge.getId(), source: edge.getSource(), diff --git a/src/task.ts b/src/task.ts index 65f8667..3019c71 100644 --- a/src/task.ts +++ b/src/task.ts @@ -1,5 +1,5 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; -import { TaskType, TaskTrigger, Execution } from "./types"; +import { TaskType, TaskTrigger, Execution, TaskEdge, TaskNode } from "./types"; import { triggerFromGRPC, nodeFromGRPC, taskEdgeFromGRPC } from "./builder"; class Task implements TaskType { @@ -8,8 +8,8 @@ class Task implements TaskType { owner: string; smartWalletAddress: string; trigger: TaskTrigger; - nodes: any[]; - edges: any[]; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; diff --git a/src/types.ts b/src/types.ts index 99957cd..ee87b54 100644 --- a/src/types.ts +++ b/src/types.ts @@ -34,24 +34,26 @@ export interface TaskTrigger { } } +export interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} + export interface TaskType { id: string; owner: string; smartWalletAddress: string; trigger: TaskTrigger; - nodes: Array<{ - taskType: number; - id: string; - name: string; - ethTransfer?: any; - contractWrite?: any; - contractRead?: any; - restApi?: any; - customCode?: any; - branch?: any; - filter?: any; - }>; - edges: any[]; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; @@ -95,4 +97,10 @@ export interface Execution { epoch: number; userOpHash: string; error: string; +} + +export interface TaskEdge { + id: string; + source: string; + target: string; } \ No newline at end of file From b6355ca3865e074f59ce235b5cef99f15dbbf543 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:05:35 -0800 Subject: [PATCH 33/51] pr feedback --- .github/workflows/run-test-on-pr.yml | 8 ++++++-- tests/basic.test.ts | 8 +++++--- tests/cancelTask.test.ts | 4 +++- tests/createTask.test.ts | 4 +++- tests/deleteTask.test.ts | 4 +++- tests/fixture.ts | 2 +- tests/getAddresses.test.ts | 8 +++++--- tests/getTask.test.ts | 4 +++- tests/listTasks.test.ts | 4 +++- 9 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 4cedf5f..d5df41a 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -11,6 +11,7 @@ jobs: env: TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} + TEST_API_KEY: ${{ secrets.TEST_API_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} ENDPOINT: localhost:2206 @@ -45,8 +46,11 @@ jobs: sleep 5 done - echo "TEST_API_KEY=$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" >> $GITHUB_ENV + - name: Run tests againts local AVS + run: | + export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" + npm test - - name: Run tests + - name: Run tests againts staging AVS run: | npm test \ No newline at end of file diff --git a/tests/basic.test.ts b/tests/basic.test.ts index fb37fff..ccb02c0 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -4,7 +4,7 @@ import Client from "../src/index"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1, DUMMY_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,11 +12,13 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar('TEST_API_KEY'), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar('TOKEN_CONTRACT'), ORACLE_CONTRACT: requireEnvVar('ORACLE_CONTRACT'), ENDPOINT: requireEnvVar('ENDPOINT'), @@ -106,8 +108,8 @@ describe("Client E2E Tests", () => { endpoint: ENDPOINT, }); - walletAddress = await getAddress(TEST_PRIVATE_KEY); - const signature = await generateSignature(TEST_PRIVATE_KEY, EXPIRED_AT); + walletAddress = await getAddress(DUMMY_PRIVATE_KEY); + const signature = await generateSignature(DUMMY_PRIVATE_KEY, EXPIRED_AT); if (!signature) { throw new Error( diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 3f39c98..cdfdceb 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1 } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -13,11 +13,13 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index f4961e4..7132374 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, sampleTask2, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1, sampleTask2 } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -13,11 +13,13 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index 62cda7f..a5d9335 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1 } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,11 +12,13 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/fixture.ts b/tests/fixture.ts index 714bd2c..83d1273 100644 --- a/tests/fixture.ts +++ b/tests/fixture.ts @@ -3,7 +3,7 @@ import { UlidMonotonic } from "id128"; import { requireEnvVar } from "./utils"; // Dummy private key for determinictics test -export const TEST_PRIVATE_KEY = "0x677240d3b2d8a167e536969785de1bb9f893ed0593682dc8c4dbaf8980d325ee" +export const DUMMY_PRIVATE_KEY = "0x677240d3b2d8a167e536969785de1bb9f893ed0593682dc8c4dbaf8980d325ee" export const sampleTask1 = { smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', diff --git a/tests/getAddresses.test.ts b/tests/getAddresses.test.ts index 8075949..4093e32 100644 --- a/tests/getAddresses.test.ts +++ b/tests/getAddresses.test.ts @@ -3,18 +3,20 @@ import Client from "../src"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { TEST_PRIVATE_KEY } from "./fixture"; +import { DUMMY_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -28,7 +30,7 @@ describe("listSmartWalletses Tests", () => { let client: Client; beforeAll(async () => { - ownerAddress = await getAddress(TEST_PRIVATE_KEY); + ownerAddress = await getAddress(DUMMY_PRIVATE_KEY); console.log("Client endpoint:", ENDPOINT, "\nOwner address:", ownerAddress); // Initialize the client with test credentials @@ -43,7 +45,7 @@ describe("listSmartWalletses Tests", () => { beforeAll(async () => { console.log("Authenticating with signature ..."); - const signature = await generateSignature(TEST_PRIVATE_KEY, EXPIRED_AT); + const signature = await generateSignature(DUMMY_PRIVATE_KEY, EXPIRED_AT); const res = await client.authWithSignature( ownerAddress, signature, diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index ca41400..275b1bc 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1 } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -13,11 +13,13 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index 9e23fe7..04b6255 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, TEST_PRIVATE_KEY } from "./fixture"; +import { sampleTask1 } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -12,11 +12,13 @@ dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); // Get environment variables with type safety const { TEST_API_KEY, + TEST_PRIVATE_KEY, TOKEN_CONTRACT, ORACLE_CONTRACT, ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), From bb887d8f8e3b20155434d94c941b2b434324d9cb Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:10:21 -0800 Subject: [PATCH 34/51] switch to dist --- tests/basic.test.ts | 2 +- tests/cancelTask.test.ts | 2 +- tests/createTask.test.ts | 2 +- tests/deleteTask.test.ts | 2 +- tests/getAddresses.test.ts | 2 +- tests/getTask.test.ts | 2 +- tests/listTasks.test.ts | 2 +- tests/utils.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index ccb02c0..78a5772 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -1,6 +1,6 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src/index"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index cdfdceb..2dfb324 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -1,6 +1,6 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index 7132374..0b3bfb9 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -1,6 +1,6 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index a5d9335..05e3963 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -1,5 +1,5 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/getAddresses.test.ts b/tests/getAddresses.test.ts index 4093e32..7ec7dc0 100644 --- a/tests/getAddresses.test.ts +++ b/tests/getAddresses.test.ts @@ -1,5 +1,5 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index 275b1bc..521d272 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -1,6 +1,6 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index 04b6255..ff66b32 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -1,5 +1,5 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../src"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; diff --git a/tests/utils.ts b/tests/utils.ts index b3c0035..9bf3eda 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -1,4 +1,4 @@ -import { getKeyRequestMessage } from "../src"; +import { getKeyRequestMessage } from "../dist"; import { ethers } from "ethers"; import _ from "lodash"; // Get wallet address from private key From 7f5a76229b4b698f4c4154424d893efa2afdaaaf Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:10:42 -0800 Subject: [PATCH 35/51] test --- .github/workflows/run-test-on-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index d5df41a..8afd408 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -53,4 +53,4 @@ jobs: - name: Run tests againts staging AVS run: | - npm test \ No newline at end of file + echo skip npm test \ No newline at end of file From 8111a805f9b83698387fb4df0c11a3c29a2da030 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:13:19 -0800 Subject: [PATCH 36/51] update fixture name --- tests/basic.test.ts | 2 +- tests/cancelTask.test.ts | 2 +- tests/createTask.test.ts | 2 +- tests/deleteTask.test.ts | 2 +- tests/fixture.ts | 4 ++-- tests/getTask.test.ts | 2 +- tests/listTasks.test.ts | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 78a5772..cb9a928 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -4,7 +4,7 @@ import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, DUMMY_PRIVATE_KEY } from "./fixture"; +import { erc20TransferTask, DUMMY_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 2dfb324..1e36e1b 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { erc20TransferTask } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index 0b3bfb9..ecee203 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1, sampleTask2 } from "./fixture"; +import { erc20TransferTask, multiNodeBranchingTask } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index 05e3963..0a2d5d6 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { erc20TransferTask } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); diff --git a/tests/fixture.ts b/tests/fixture.ts index 83d1273..e617f09 100644 --- a/tests/fixture.ts +++ b/tests/fixture.ts @@ -5,7 +5,7 @@ import { requireEnvVar } from "./utils"; // Dummy private key for determinictics test export const DUMMY_PRIVATE_KEY = "0x677240d3b2d8a167e536969785de1bb9f893ed0593682dc8c4dbaf8980d325ee" -export const sampleTask1 = { +export const erc20TransferTask = { smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', startAt: Math.floor(Date.now() / 1000) + 30, expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), @@ -33,7 +33,7 @@ export const sampleTask1 = { }], }; -export const sampleTask2 = { +export const multiNodeBranchingTask = { smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', startAt: Math.floor(Date.now() / 1000) + 30, expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index 521d272..192e271 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -5,7 +5,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { erc20TransferTask } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index ff66b32..2ba17b6 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -4,7 +4,7 @@ import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; -import { sampleTask1 } from "./fixture"; +import { erc20TransferTask } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); From ce82fc0394739c3c320620aae9ef3d1828fb2fa6 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:15:18 -0800 Subject: [PATCH 37/51] update readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index faf106d..3d1dc76 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. docker compose up -d ``` + Note: Every commit on every branch of https://github.com/AvaProtocol/EigenLayer-AVS will auto-generate a Docker image. By default the `docker compose up -d` is pulling the latest commit on the main branch. + 4. Run the test command. This will test the SDK against test server, configured in `.env.test`. ```bash From 0fbb45b1d3fc0488b89c702dbe3afa8a2b2603cf Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:17:03 -0800 Subject: [PATCH 38/51] update --- tests/basic.test.ts | 16 +++++++------- tests/cancelTask.test.ts | 6 +++--- tests/createTask.test.ts | 46 ++++++++++++++++++++-------------------- tests/deleteTask.test.ts | 6 +++--- tests/getTask.test.ts | 14 ++++++------ tests/listTasks.test.ts | 4 ++-- 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/tests/basic.test.ts b/tests/basic.test.ts index cb9a928..3111b68 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -138,21 +138,21 @@ describe("Client E2E Tests", () => { }); test("createTask", async () => { - const result = await client.createTask(sampleTask1, { authKey }); + const result = await client.createTask(erc20TransferTask, { authKey }); expect(result).toBeDefined(); expect(result).toHaveLength(26); }); test("getTask", async () => { - const result = await client.createTask(sampleTask1, { authKey }); + const result = await client.createTask(erc20TransferTask, { authKey }); expect(result).toHaveLength(26); const task = await client.getTask(result, { authKey }); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.trigger.block.interval).toEqual(5); }); @@ -161,10 +161,10 @@ describe("Client E2E Tests", () => { const smartWallet = await client.createWallet({salt: "345"}, { authKey }); // populate tasks for default wallet and the custom salt smart wallet above - const result1 = await client.createTask({...sampleTask1, memo: 'task1 test', smartWalletAddress: smartWallet.address}, { authKey }); + const result1 = await client.createTask({...erc20TransferTask, memo: 'task1 test', smartWalletAddress: smartWallet.address}, { authKey }); const tasks1 = await client.listTasks(smartWallet.address, { authKey }); - const result2 = await client.createTask({...sampleTask1, memo: 'default wallet test'}, { authKey }); + const result2 = await client.createTask({...erc20TransferTask, memo: 'default wallet test'}, { authKey }); const tasks2 = await client.listTasks("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41", { authKey }); expect(tasks1.length).toBeGreaterThanOrEqual(1); @@ -182,7 +182,7 @@ describe("Client E2E Tests", () => { }); test("cancelTask", async () => { - const result = await client.createTask(sampleTask1, { authKey }); + const result = await client.createTask(erc20TransferTask, { authKey }); const task = await client.getTask(result, { authKey }); expect(task.status).toEqual( avs_pb.TaskStatus.ACTIVE); @@ -193,7 +193,7 @@ describe("Client E2E Tests", () => { }); test("deleteTask", async () => { - const result = await client.createTask(sampleTask1, { authKey }); + const result = await client.createTask(erc20TransferTask, { authKey }); const task = await client.getTask(result, { authKey }); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.id).toHaveLength(26); diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 1e36e1b..07e3330 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -64,7 +64,7 @@ describe("cancelTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); @@ -102,7 +102,7 @@ describe("cancelTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); @@ -145,7 +145,7 @@ describe("cancelTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( { - ...sampleTask1, + ...erc20TransferTask, smartWalletAddress }, { authKey } diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index ecee203..88288f2 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -63,7 +63,7 @@ describe("createTask Tests", () => { test("should create a task when authenticated with signature", async () => { const result = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); console.log("Create task result:", result); @@ -73,7 +73,7 @@ describe("createTask Tests", () => { test("should throw error when creating a task with owner address using signature", async () => { await expect(client.createTask( - { ...sampleTask1, smartWalletAddress: ownerAddress }, + { ...erc20TransferTask, smartWalletAddress: ownerAddress }, { authKey } )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); @@ -81,7 +81,7 @@ describe("createTask Tests", () => { test("create cron trigger", async () => { const result = await client.createTask( { - ...sampleTask1, + ...erc20TransferTask, smartWalletAddress, // https://crontab.guru/ for syntax trigger: { @@ -95,8 +95,8 @@ describe("createTask Tests", () => { expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.CRON); expect(task.trigger.cron.schedule[0]).toEqual("5 4 * * *"); @@ -106,7 +106,7 @@ describe("createTask Tests", () => { test("create fixed time trigger", async () => { const result = await client.createTask( { - ...sampleTask1, + ...erc20TransferTask, smartWalletAddress, // https://crontab.guru/ for syntax trigger: { @@ -120,8 +120,8 @@ describe("createTask Tests", () => { expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME); expect(task.trigger.fixedTime.epochs).toEqual([10, 20, 30]); @@ -130,7 +130,7 @@ describe("createTask Tests", () => { test("create event trigger", async () => { const result = await client.createTask( { - ...sampleTask1, + ...erc20TransferTask, smartWalletAddress, // https://crontab.guru/ for syntax trigger: { @@ -144,8 +144,8 @@ describe("createTask Tests", () => { expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.EVENT); expect(task.trigger.event.expression).toEqual(`topic0 == "0x123" && topic2 == "0xdef"` ); @@ -154,7 +154,7 @@ describe("createTask Tests", () => { test("create manual trigger", async () => { const result = await client.createTask( { - ...sampleTask1, + ...erc20TransferTask, smartWalletAddress, // https://crontab.guru/ for syntax trigger: { @@ -168,8 +168,8 @@ describe("createTask Tests", () => { expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.MANUAL); expect(task.trigger.manual).toBe(true); @@ -178,7 +178,7 @@ describe("createTask Tests", () => { test("create block trigger", async () => { const result = await client.createTask( { - ...sampleTask1, + ...erc20TransferTask, smartWalletAddress, // https://crontab.guru/ for syntax trigger: { @@ -194,8 +194,8 @@ describe("createTask Tests", () => { expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(1); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); expect(task.trigger.block.interval).toEqual(102); @@ -204,7 +204,7 @@ describe("createTask Tests", () => { test("create complex task with multi nodes and edge ", async() => { const result = await client.createTask( { - ...sampleTask2, + ...multiNodeBranchingTask, smartWalletAddress, }, { authKey }); @@ -214,8 +214,8 @@ describe("createTask Tests", () => { expect(task.id).toEqual(result); expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); expect(task.nodes).toHaveLength(6); - expect(task.nodes[0].contractWrite.contractAddress).toEqual(sampleTask1.nodes[0].contractWrite.contractAddress); - expect(task.nodes[0].contractWrite.callData).toEqual(sampleTask1.nodes[0].contractWrite.callData); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); expect(task.nodes[5].branch.conditions).toHaveLength(3); expect(task.nodes[5].branch.conditions[0].type).toEqual("if"); @@ -249,7 +249,7 @@ describe("createTask Tests", () => { test("should create a task when authenticated with API key", async () => { const result = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); console.log("Create task result:", result); @@ -259,7 +259,7 @@ describe("createTask Tests", () => { test("should throw error when creating a task with owner address using API key", async () => { await expect(client.createTask( - { ...sampleTask1, smartWalletAddress: ownerAddress }, + { ...erc20TransferTask, smartWalletAddress: ownerAddress }, { authKey } )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account addres"); }); @@ -271,7 +271,7 @@ describe("createTask Tests", () => { test("should throw error when creating a task without authentication", async () => { await expect(client.createTask( - { ...sampleTask1, smartWalletAddress } + { ...erc20TransferTask, smartWalletAddress } )).rejects.toThrow("missing auth header"); }); }); diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index 0a2d5d6..f143627 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -63,7 +63,7 @@ describe("deleteTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); @@ -104,7 +104,7 @@ describe("deleteTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); @@ -152,7 +152,7 @@ describe("deleteTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index 192e271..8789e25 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -65,7 +65,7 @@ describe("getTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( { - ...sampleTask1, smartWalletAddress + ...erc20TransferTask, smartWalletAddress }, { authKey } ); @@ -81,8 +81,8 @@ describe("getTask Tests", () => { expect(result.smartWalletAddress).toEqual(smartWalletAddress); //expect(result.trigger).toBeDefined(); expect(result.nodes).toHaveLength(1); - expect(result.expiredAt).toEqual(sampleTask1.expiredAt); - expect(result.memo).toEqual(sampleTask1.memo); + expect(result.expiredAt).toEqual(erc20TransferTask.expiredAt); + expect(result.memo).toEqual(erc20TransferTask.memo); }); test("should throw task not found when getting an non-existent task", async () => { @@ -107,7 +107,7 @@ describe("getTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); @@ -124,8 +124,8 @@ describe("getTask Tests", () => { expect(result.trigger).toBeDefined(); expect(result.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); expect(result.nodes).toHaveLength(1); - expect(result.expiredAt).toEqual(sampleTask1.expiredAt); - expect(result.memo).toEqual(sampleTask1.memo); + expect(result.expiredAt).toEqual(erc20TransferTask.expiredAt); + expect(result.memo).toEqual(erc20TransferTask.memo); }); test("should throw task not found when getting an non-existent task", async () => { @@ -155,7 +155,7 @@ describe("getTask Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index 2ba17b6..bd71c21 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -63,7 +63,7 @@ describe("listTasks Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); @@ -103,7 +103,7 @@ describe("listTasks Tests", () => { console.log("Creating a task to use for the following tests"); createdTaskId = await client.createTask( - { ...sampleTask1, smartWalletAddress }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); }); From fee4ca079a4d0560bf89e57d22ebda5a762b2555 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 11:21:05 -0800 Subject: [PATCH 39/51] add backend endpoint --- .github/workflows/run-test-on-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 8afd408..b33b813 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -14,7 +14,7 @@ jobs: TEST_API_KEY: ${{ secrets.TEST_API_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} - ENDPOINT: localhost:2206 + ENDPOINT: ${{ vars.ENDPOINT }} steps: - name: Checkout repository @@ -49,6 +49,7 @@ jobs: - name: Run tests againts local AVS run: | export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" + export ENDPOINT="localhost:2206" npm test - name: Run tests againts staging AVS From 5efd01d1c8e822055b032340263f7dc57641a9b7 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 12:35:01 -0800 Subject: [PATCH 40/51] run test agains local and staging --- .github/workflows/run-test-on-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index b33b813..e44a3c9 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -10,8 +10,8 @@ jobs: environment: test # The below environment variables are only available in the test environment env: - TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} TEST_API_KEY: ${{ secrets.TEST_API_KEY }} + TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} ENDPOINT: ${{ vars.ENDPOINT }} @@ -48,10 +48,10 @@ jobs: - name: Run tests againts local AVS run: | - export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" + export LOCAL_TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" export ENDPOINT="localhost:2206" npm test - name: Run tests againts staging AVS run: | - echo skip npm test \ No newline at end of file + npm test \ No newline at end of file From b5be36724d348ac98df8fd07f28940a56958b00c Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 12:38:36 -0800 Subject: [PATCH 41/51] add sleep to wait --- .github/workflows/run-test-on-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index e44a3c9..e5b8f52 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -48,6 +48,7 @@ jobs: - name: Run tests againts local AVS run: | + sleep 5 export LOCAL_TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" export ENDPOINT="localhost:2206" npm test From 1dbc3decf49ce51d911fad55d65c5dac3840588e Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 13:25:36 -0800 Subject: [PATCH 42/51] export right env --- .github/workflows/run-test-on-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index e5b8f52..3b01169 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -49,7 +49,7 @@ jobs: - name: Run tests againts local AVS run: | sleep 5 - export LOCAL_TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" + export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" export ENDPOINT="localhost:2206" npm test From f6721508b255f575c0d4a25007cbe27da7471785 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 15:13:14 -0800 Subject: [PATCH 43/51] wait --- .github/workflows/run-test-on-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 3b01169..737ee14 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -48,7 +48,7 @@ jobs: - name: Run tests againts local AVS run: | - sleep 5 + sleep 10 export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" export ENDPOINT="localhost:2206" npm test From 457aeed53c117a19b4c5b499ab4e7a1a01b02780 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 15:15:52 -0800 Subject: [PATCH 44/51] debug --- .github/workflows/run-test-on-pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 737ee14..26e7dd5 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -48,9 +48,10 @@ jobs: - name: Run tests againts local AVS run: | - sleep 10 + curl localhost:1323/telemetry export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" export ENDPOINT="localhost:2206" + sleep 15 npm test - name: Run tests againts staging AVS From 173a81bbe890d0712071736709b72517c849501d Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 15:41:26 -0800 Subject: [PATCH 45/51] separea local and staging test --- .github/workflows/run-test-on-pr.yml | 43 ++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/run-test-on-pr.yml index 26e7dd5..fdbf6fa 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/run-test-on-pr.yml @@ -5,7 +5,7 @@ on: branches: [ main ] jobs: - test: + staging-test: runs-on: ubuntu-latest environment: test # The below environment variables are only available in the test environment @@ -20,6 +20,39 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Debug environment variables + run: | + echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" + echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" + echo "ENDPOINT: $ENDPOINT" + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests againts staging AVS + run: | + npm test + + local-test: + runs-on: ubuntu-latest + environment: test # The below environment variables are only available in the test environment + + env: + TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} + TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} + ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} + ENDPOINT: "localhost:2206" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Bring up docker compose run: | docker compose up -d @@ -41,19 +74,13 @@ jobs: - name: ensure the aggregator and env is ready run: | - until curl --output /dev/null --silent --fail http://localhost:1323/telemetry; do + until curl --output /dev/null --silent --fail http://localhost:1323/up; do printf '.' sleep 5 done - name: Run tests againts local AVS run: | - curl localhost:1323/telemetry export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" export ENDPOINT="localhost:2206" - sleep 15 - npm test - - - name: Run tests againts staging AVS - run: | npm test \ No newline at end of file From 7666f88a58d2f8658c8f3e8ae233933383f3d81a Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Wed, 20 Nov 2024 18:54:53 -0800 Subject: [PATCH 46/51] Added auto-replace command of TEST_API_KEY to gen-apikey --- README.md | 33 +++++++++++++++++---------------- package.json | 2 +- tests/basic.test.ts | 2 +- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 3d1dc76..0cc6782 100644 --- a/README.md +++ b/README.md @@ -67,21 +67,23 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. 3. Bring up a locally environment for aggregator ```bash - docker compose up -d + docker compose up -d --pull always ``` - When running test, you will want to test against different aggregator. You can do so by finding the hash of the branch/commit of EigenLayer-AVS code and run it like this + > By default the above command will pull the docker image of the latest commit on the `main` branch of https://github.com/AvaProtocol/EigenLayer-AVS. Alternatively, we could also run tests against a specific commit with the below command. + > + > ``` + > export AVS_BUILD_VERSION=git-commit-hash-123 + > docker compose up -d --pull always + > ``` - ``` - export AVS_BUILD_VERSION=git-commit-hash-123 - docker compose down - docker compose pull - docker compose up -d - ``` +4. Generate a test API key for the local tests with the following command. It will automatically save the output to the `TEST_API_KEY` variable in `.env.test`. - Note: Every commit on every branch of https://github.com/AvaProtocol/EigenLayer-AVS will auto-generate a Docker image. By default the `docker compose up -d` is pulling the latest commit on the main branch. + ```bash + npm run gen-apikey + ``` -4. Run the test command. This will test the SDK against test server, configured in `.env.test`. +5. Run the test command with env variables set in `.env.test`. ```bash # Run all tests @@ -91,14 +93,13 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. npm run test:select -- ``` - Note: to generate an api for `TEST_API_KEY`, bring up the docker compose and run `npm run gen-api-key`. + > Note: In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first. -5. In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first. - ```bash - npm run test:select -- "createTask|cancelTask" - ``` + > ```bash + > npm run test:select -- "createTask|cancelTask" + > ``` -This will execute all unit and integration tests. Make sure all tests pass before submitting a pull request or deploying changes. + This will execute all unit and integration tests. Make sure all tests pass in local dev environment before submitting a pull request or deploying changes. ## Release Process diff --git a/package.json b/package.json index a7249a1..595fe74 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/new-task-data-structure/protobuf/avs.proto > grpc_codegen/avs.proto", "gen-protoc": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc_codegen/ --grpc_out=grpc_js:./grpc_codegen/ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./grpc_codegen --proto_path=./grpc_codegen grpc_codegen/avs.proto", "build": "tsup src/index.ts --format cjs,esm --dts", - "gen-apikey": "docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey", + "gen-apikey": "sh -c 'API_KEY=$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey) && echo \"Generated API key for tests: $API_KEY\" && echo \"Writing to .env.test to replace the TEST_API_KEY env variable\" && sed -i \"\" -e \"s/^TEST_API_KEY=.*/TEST_API_KEY=$API_KEY/\" .env.test && echo \"Done.\"'", "test": "jest --config jest.config.cjs", "test:select": "npm run test -- --testNamePattern", "changeset": "changeset", diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 3111b68..4fd728f 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -27,7 +27,7 @@ const { // Define EXPIRED_AT as a constant const EXPIRED_AT = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // 24 hours from now -describe("Client E2E Tests", () => { +describe("Basic Tests", () => { let client: Client; let walletAddress: string; // Add this line to declare the variable From 82848b1efb4999fe0bd6512bce2dd718c63dad6b Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Wed, 20 Nov 2024 18:55:11 -0800 Subject: [PATCH 47/51] Removed dist folder since we can auto-generate it now --- dist/index.d.mts | 1377 ----------- dist/index.d.ts | 1377 ----------- dist/index.js | 5735 ---------------------------------------------- dist/index.mjs | 5728 --------------------------------------------- 4 files changed, 14217 deletions(-) delete mode 100644 dist/index.d.mts delete mode 100644 dist/index.d.ts delete mode 100644 dist/index.js delete mode 100644 dist/index.mjs diff --git a/dist/index.d.mts b/dist/index.d.mts deleted file mode 100644 index b7d14e6..0000000 --- a/dist/index.d.mts +++ /dev/null @@ -1,1377 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import { Metadata } from '@grpc/grpc-js'; -import * as jspb from 'google-protobuf'; -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; - -declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; - -// package: aggregator -// file: avs.proto - - - -declare class IdReq extends jspb.Message { - getId(): string; - setId(value: string): IdReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): IdReq.AsObject; - static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): IdReq; - static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; -} - -declare namespace IdReq { - export type AsObject = { - id: string, - } -} - -declare class Checkin extends jspb.Message { - getId(): string; - setId(value: string): Checkin; - getAddress(): string; - setAddress(value: string): Checkin; - getSignature(): string; - setSignature(value: string): Checkin; - - hasStatus(): boolean; - clearStatus(): void; - getStatus(): Checkin.Status | undefined; - setStatus(value?: Checkin.Status): Checkin; - getVersion(): string; - setVersion(value: string): Checkin; - getMetricsport(): number; - setMetricsport(value: number): Checkin; - getRemoteip(): string; - setRemoteip(value: string): Checkin; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Checkin.AsObject; - static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Checkin; - static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; -} - -declare namespace Checkin { - export type AsObject = { - id: string, - address: string, - signature: string, - status?: Checkin.Status.AsObject, - version: string, - metricsport: number, - remoteip: string, - } - - - export class Status extends jspb.Message { - getUptime(): number; - setUptime(value: number): Status; - getQueuedepth(): number; - setQueuedepth(value: number): Status; - - hasLastHeartbeat(): boolean; - clearLastHeartbeat(): void; - getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; - } - - export namespace Status { - export type AsObject = { - uptime: number, - queuedepth: number, - lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - } - -} - -declare class CheckinResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckinResp.AsObject; - static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckinResp; - static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; -} - -declare namespace CheckinResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class SyncTasksReq extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksReq; - getAddress(): string; - setAddress(value: string): SyncTasksReq; - getSignature(): string; - setSignature(value: string): SyncTasksReq; - getMonotonicClock(): number; - setMonotonicClock(value: number): SyncTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksReq; - static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; -} - -declare namespace SyncTasksReq { - export type AsObject = { - id: string, - address: string, - signature: string, - monotonicClock: number, - } -} - -declare class FixedEpochCondition extends jspb.Message { - clearEpochsList(): void; - getEpochsList(): Array; - setEpochsList(value: Array): FixedEpochCondition; - addEpochs(value: number, index?: number): number; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; - static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; - static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; -} - -declare namespace FixedEpochCondition { - export type AsObject = { - epochsList: Array, - } -} - -declare class CronCondition extends jspb.Message { - clearScheduleList(): void; - getScheduleList(): Array; - setScheduleList(value: Array): CronCondition; - addSchedule(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CronCondition.AsObject; - static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CronCondition; - static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; -} - -declare namespace CronCondition { - export type AsObject = { - scheduleList: Array, - } -} - -declare class BlockCondition extends jspb.Message { - getInterval(): number; - setInterval(value: number): BlockCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockCondition.AsObject; - static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockCondition; - static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; -} - -declare namespace BlockCondition { - export type AsObject = { - interval: number, - } -} - -declare class EventCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): EventCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EventCondition.AsObject; - static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EventCondition; - static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; -} - -declare namespace EventCondition { - export type AsObject = { - expression: string, - } -} - -declare class TaskTrigger$1 extends jspb.Message { - - hasManual(): boolean; - clearManual(): void; - getManual(): boolean; - setManual(value: boolean): TaskTrigger$1; - - hasFixedTime(): boolean; - clearFixedTime(): void; - getFixedTime(): FixedEpochCondition | undefined; - setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; - - hasCron(): boolean; - clearCron(): void; - getCron(): CronCondition | undefined; - setCron(value?: CronCondition): TaskTrigger$1; - - hasBlock(): boolean; - clearBlock(): void; - getBlock(): BlockCondition | undefined; - setBlock(value?: BlockCondition): TaskTrigger$1; - - hasEvent(): boolean; - clearEvent(): void; - getEvent(): EventCondition | undefined; - setEvent(value?: EventCondition): TaskTrigger$1; - - getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; - static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; -} - -declare namespace TaskTrigger$1 { - export type AsObject = { - manual: boolean, - fixedTime?: FixedEpochCondition.AsObject, - cron?: CronCondition.AsObject, - block?: BlockCondition.AsObject, - event?: EventCondition.AsObject, - } - - export enum TriggerTypeCase { - TRIGGER_TYPE_NOT_SET = 0, - MANUAL = 1, - FIXED_TIME = 2, - CRON = 3, - BLOCK = 4, - EVENT = 5, - } - -} - -declare class SyncTasksResp extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksResp; - getChecktype(): string; - setChecktype(value: string): SyncTasksResp; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger$1 | undefined; - setTrigger(value?: TaskTrigger$1): SyncTasksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksResp; - static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; -} - -declare namespace SyncTasksResp { - export type AsObject = { - id: string, - checktype: string, - trigger?: TaskTrigger$1.AsObject, - } -} - -declare class ETHTransferNode extends jspb.Message { - getDestination(): string; - setDestination(value: string): ETHTransferNode; - getAmount(): string; - setAmount(value: string): ETHTransferNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransferNode.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransferNode; - static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; -} - -declare namespace ETHTransferNode { - export type AsObject = { - destination: string, - amount: string, - } -} - -declare class ContractWriteNode extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractWriteNode; - getCallData(): string; - setCallData(value: string): ContractWriteNode; - getContractAbi(): string; - setContractAbi(value: string): ContractWriteNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractWriteNode.AsObject; - static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractWriteNode; - static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; -} - -declare namespace ContractWriteNode { - export type AsObject = { - contractAddress: string, - callData: string, - contractAbi: string, - } -} - -declare class ContractReadNode extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractReadNode; - getCallData(): string; - setCallData(value: string): ContractReadNode; - getContractAbi(): string; - setContractAbi(value: string): ContractReadNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractReadNode.AsObject; - static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractReadNode; - static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; -} - -declare namespace ContractReadNode { - export type AsObject = { - contractAddress: string, - callData: string, - contractAbi: string, - } -} - -declare class GraphQLQueryNode extends jspb.Message { - getUrl(): string; - setUrl(value: string): GraphQLQueryNode; - getQuery(): string; - setQuery(value: string): GraphQLQueryNode; - - getVariablesMap(): jspb.Map; - clearVariablesMap(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; - static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; -} - -declare namespace GraphQLQueryNode { - export type AsObject = { - url: string, - query: string, - - variablesMap: Array<[string, string]>, - } -} - -declare class RestAPINode extends jspb.Message { - getUrl(): string; - setUrl(value: string): RestAPINode; - - getHeadersMap(): jspb.Map; - clearHeadersMap(): void; - getBody(): string; - setBody(value: string): RestAPINode; - getMethod(): string; - setMethod(value: string): RestAPINode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RestAPINode.AsObject; - static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RestAPINode; - static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; -} - -declare namespace RestAPINode { - export type AsObject = { - url: string, - - headersMap: Array<[string, string]>, - body: string, - method: string, - } -} - -declare class CustomCodeNode extends jspb.Message { - getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCodeNode; - getSource(): string; - setSource(value: string): CustomCodeNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCodeNode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCodeNode; - static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; -} - -declare namespace CustomCodeNode { - export type AsObject = { - type: CustomCodeType, - source: string, - } -} - -declare class Condition extends jspb.Message { - getId(): string; - setId(value: string): Condition; - getType(): string; - setType(value: string): Condition; - getExpression(): string; - setExpression(value: string): Condition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Condition.AsObject; - static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Condition; - static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; -} - -declare namespace Condition { - export type AsObject = { - id: string, - type: string, - expression: string, - } -} - -declare class BranchNode extends jspb.Message { - clearConditionsList(): void; - getConditionsList(): Array; - setConditionsList(value: Array): BranchNode; - addConditions(value?: Condition, index?: number): Condition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchNode.AsObject; - static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchNode; - static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; -} - -declare namespace BranchNode { - export type AsObject = { - conditionsList: Array, - } -} - -declare class FilterNode extends jspb.Message { - getExpression(): string; - setExpression(value: string): FilterNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FilterNode.AsObject; - static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FilterNode; - static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; -} - -declare namespace FilterNode { - export type AsObject = { - expression: string, - } -} - -declare class LoopNode extends jspb.Message { - getIterVar(): string; - setIterVar(value: string): LoopNode; - getIterKey(): string; - setIterKey(value: string): LoopNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LoopNode.AsObject; - static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LoopNode; - static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; -} - -declare namespace LoopNode { - export type AsObject = { - iterVar: string, - iterKey: string, - } -} - -declare class TaskEdge$1 extends jspb.Message { - getId(): string; - setId(value: string): TaskEdge$1; - getSource(): string; - setSource(value: string): TaskEdge$1; - getTarget(): string; - setTarget(value: string): TaskEdge$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskEdge$1.AsObject; - static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskEdge$1; - static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; -} - -declare namespace TaskEdge$1 { - export type AsObject = { - id: string, - source: string, - target: string, - } -} - -declare class TaskNode$1 extends jspb.Message { - getId(): string; - setId(value: string): TaskNode$1; - getName(): string; - setName(value: string): TaskNode$1; - - hasEthTransfer(): boolean; - clearEthTransfer(): void; - getEthTransfer(): ETHTransferNode | undefined; - setEthTransfer(value?: ETHTransferNode): TaskNode$1; - - hasContractWrite(): boolean; - clearContractWrite(): void; - getContractWrite(): ContractWriteNode | undefined; - setContractWrite(value?: ContractWriteNode): TaskNode$1; - - hasContractRead(): boolean; - clearContractRead(): void; - getContractRead(): ContractReadNode | undefined; - setContractRead(value?: ContractReadNode): TaskNode$1; - - hasGraphqlDataQuery(): boolean; - clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLQueryNode | undefined; - setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; - - hasRestApi(): boolean; - clearRestApi(): void; - getRestApi(): RestAPINode | undefined; - setRestApi(value?: RestAPINode): TaskNode$1; - - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchNode | undefined; - setBranch(value?: BranchNode): TaskNode$1; - - hasFilter(): boolean; - clearFilter(): void; - getFilter(): FilterNode | undefined; - setFilter(value?: FilterNode): TaskNode$1; - - hasLoop(): boolean; - clearLoop(): void; - getLoop(): LoopNode | undefined; - setLoop(value?: LoopNode): TaskNode$1; - - hasCustomCode(): boolean; - clearCustomCode(): void; - getCustomCode(): CustomCodeNode | undefined; - setCustomCode(value?: CustomCodeNode): TaskNode$1; - - getTaskTypeCase(): TaskNode$1.TaskTypeCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskNode$1.AsObject; - static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskNode$1; - static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; -} - -declare namespace TaskNode$1 { - export type AsObject = { - id: string, - name: string, - ethTransfer?: ETHTransferNode.AsObject, - contractWrite?: ContractWriteNode.AsObject, - contractRead?: ContractReadNode.AsObject, - graphqlDataQuery?: GraphQLQueryNode.AsObject, - restApi?: RestAPINode.AsObject, - branch?: BranchNode.AsObject, - filter?: FilterNode.AsObject, - loop?: LoopNode.AsObject, - customCode?: CustomCodeNode.AsObject, - } - - export enum TaskTypeCase { - TASK_TYPE_NOT_SET = 0, - ETH_TRANSFER = 10, - CONTRACT_WRITE = 11, - CONTRACT_READ = 12, - GRAPHQL_DATA_QUERY = 13, - REST_API = 14, - BRANCH = 15, - FILTER = 16, - LOOP = 17, - CUSTOM_CODE = 18, - } - -} - -declare class Execution$1 extends jspb.Message { - getEpoch(): number; - setEpoch(value: number): Execution$1; - getUserOpHash(): string; - setUserOpHash(value: string): Execution$1; - getError(): string; - setError(value: string): Execution$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution$1.AsObject; - static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution$1; - static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; -} - -declare namespace Execution$1 { - export type AsObject = { - epoch: number, - userOpHash: string, - error: string, - } -} - -declare class Task$1 extends jspb.Message { - getId(): string; - setId(value: string): Task$1; - getOwner(): string; - setOwner(value: string): Task$1; - getSmartWalletAddress(): string; - setSmartWalletAddress(value: string): Task$1; - getStartAt(): number; - setStartAt(value: number): Task$1; - getExpiredAt(): number; - setExpiredAt(value: number): Task$1; - getMemo(): string; - setMemo(value: string): Task$1; - getCompletedAt(): number; - setCompletedAt(value: number): Task$1; - getMaxExecution(): number; - setMaxExecution(value: number): Task$1; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task$1; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger$1 | undefined; - setTrigger(value?: TaskTrigger$1): Task$1; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task$1; - addNodes(value?: TaskNode$1, index?: number): TaskNode$1; - clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): Task$1; - addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; - clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task$1; - addExecutions(value?: Execution$1, index?: number): Execution$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task$1.AsObject; - static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task$1; - static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; -} - -declare namespace Task$1 { - export type AsObject = { - id: string, - owner: string, - smartWalletAddress: string, - startAt: number, - expiredAt: number, - memo: string, - completedAt: number, - maxExecution: number, - status: TaskStatus, - trigger?: TaskTrigger$1.AsObject, - nodesList: Array, - edgesList: Array, - executionsList: Array, - } -} - -declare class CreateTaskReq extends jspb.Message { - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger$1 | undefined; - setTrigger(value?: TaskTrigger$1): CreateTaskReq; - getStartAt(): number; - setStartAt(value: number): CreateTaskReq; - getExpiredAt(): number; - setExpiredAt(value: number): CreateTaskReq; - getMaxExecution(): number; - setMaxExecution(value: number): CreateTaskReq; - getSmartWalletAddress(): string; - setSmartWalletAddress(value: string): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): CreateTaskReq; - addNodes(value?: TaskNode$1, index?: number): TaskNode$1; - clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): CreateTaskReq; - addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskReq.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskReq; - static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; -} - -declare namespace CreateTaskReq { - export type AsObject = { - trigger?: TaskTrigger$1.AsObject, - startAt: number, - expiredAt: number, - maxExecution: number, - smartWalletAddress: string, - memo: string, - nodesList: Array, - edgesList: Array, - } -} - -declare class CreateTaskResp extends jspb.Message { - getId(): string; - setId(value: string): CreateTaskResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskResp; - static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; -} - -declare namespace CreateTaskResp { - export type AsObject = { - id: string, - } -} - -declare class NonceRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): NonceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceRequest.AsObject; - static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceRequest; - static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; -} - -declare namespace NonceRequest { - export type AsObject = { - owner: string, - } -} - -declare class NonceResp extends jspb.Message { - getNonce(): string; - setNonce(value: string): NonceResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceResp.AsObject; - static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceResp; - static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; -} - -declare namespace NonceResp { - export type AsObject = { - nonce: string, - } -} - -declare class ListWalletReq extends jspb.Message { - getFactory(): string; - setFactory(value: string): ListWalletReq; - getSalt(): string; - setSalt(value: string): ListWalletReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListWalletReq.AsObject; - static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListWalletReq; - static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; -} - -declare namespace ListWalletReq { - export type AsObject = { - factory: string, - salt: string, - } -} - -declare class SmartWallet$1 extends jspb.Message { - getAddress(): string; - setAddress(value: string): SmartWallet$1; - getSalt(): string; - setSalt(value: string): SmartWallet$1; - getFactory(): string; - setFactory(value: string): SmartWallet$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SmartWallet$1.AsObject; - static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SmartWallet$1; - static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; -} - -declare namespace SmartWallet$1 { - export type AsObject = { - address: string, - salt: string, - factory: string, - } -} - -declare class ListWalletResp extends jspb.Message { - clearWalletsList(): void; - getWalletsList(): Array; - setWalletsList(value: Array): ListWalletResp; - addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListWalletResp.AsObject; - static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListWalletResp; - static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; -} - -declare namespace ListWalletResp { - export type AsObject = { - walletsList: Array, - } -} - -declare class ListTasksReq extends jspb.Message { - getSmartWalletAddress(): string; - setSmartWalletAddress(value: string): ListTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksReq; - static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; -} - -declare namespace ListTasksReq { - export type AsObject = { - smartWalletAddress: string, - } -} - -declare class ListTasksResp extends jspb.Message { - clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: Task$1, index?: number): Task$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksResp; - static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; -} - -declare namespace ListTasksResp { - export type AsObject = { - tasksList: Array, - } -} - -declare class GetKeyReq extends jspb.Message { - getOwner(): string; - setOwner(value: string): GetKeyReq; - getExpiredAt(): number; - setExpiredAt(value: number): GetKeyReq; - getSignature(): string; - setSignature(value: string): GetKeyReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyReq.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyReq; - static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; -} - -declare namespace GetKeyReq { - export type AsObject = { - owner: string, - expiredAt: number, - signature: string, - } -} - -declare class KeyResp extends jspb.Message { - getKey(): string; - setKey(value: string): KeyResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyResp.AsObject; - static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyResp; - static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; -} - -declare namespace KeyResp { - export type AsObject = { - key: string, - } -} - -declare class UpdateChecksReq extends jspb.Message { - getAddress(): string; - setAddress(value: string): UpdateChecksReq; - getSignature(): string; - setSignature(value: string): UpdateChecksReq; - clearIdList(): void; - getIdList(): Array; - setIdList(value: Array): UpdateChecksReq; - addId(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; - static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; -} - -declare namespace UpdateChecksReq { - export type AsObject = { - address: string, - signature: string, - idList: Array, - } -} - -declare class UpdateChecksResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; - static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; -} - -declare namespace UpdateChecksResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class CreateWalletReq$1 extends jspb.Message { - getSalt(): string; - setSalt(value: string): CreateWalletReq$1; - getFactoryAddress(): string; - setFactoryAddress(value: string): CreateWalletReq$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; - static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; - static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; -} - -declare namespace CreateWalletReq$1 { - export type AsObject = { - salt: string, - factoryAddress: string, - } -} - -declare class CreateWalletResp extends jspb.Message { - getAddress(): string; - setAddress(value: string): CreateWalletResp; - getSalt(): string; - setSalt(value: string): CreateWalletResp; - getFactoryAddress(): string; - setFactoryAddress(value: string): CreateWalletResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateWalletResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateWalletResp; - static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; -} - -declare namespace CreateWalletResp { - export type AsObject = { - address: string, - salt: string, - factoryAddress: string, - } -} - -declare enum TaskStatus { - ACTIVE = 0, - COMPLETED = 1, - FAILED = 2, - CANCELED = 3, - EXECUTING = 4, -} - -declare enum CustomCodeType { - JAVASCRIPT = 0, -} - -// package: aggregator -// file: avs.proto - - - -interface IAggregatorClient { - getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; - syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; -} - -declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; - public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; -} - -type Environment = "production" | "development" | "staging"; -declare const AUTH_KEY_HEADER = "authkey"; -interface RequestOptions { - authKey: string; -} -interface GetKeyResponse { - authKey: string; -} -interface ClientOption { - endpoint: string; -} -interface TaskTrigger { - triggerType: number; - manual?: boolean; - cron?: { - schedule: string[]; - }; - event?: { - expression: string; - }; - fixedTime?: { - epochs: number[]; - }; - block?: { - interval: number; - }; -} -interface TaskNode { - taskType: number; - id: string; - name: string; - ethTransfer?: any; - contractWrite?: any; - contractRead?: any; - restApi?: any; - customCode?: any; - branch?: any; - filter?: any; -} -interface TaskType { - id: string; - owner: string; - smartWalletAddress: string; - trigger: TaskTrigger; - nodes: TaskNode[]; - edges: TaskEdge[]; - startAt: number; - expiredAt: number; - memo: string; - completedAt: number; - status: number; - maxExecution: number; - executions: Execution[]; -} -interface CreateTaskResponse { - id: string; -} -interface ListTasksResponse { - tasks: { - id: string; - status: string; - }[]; -} -interface CancelTaskResponse { - value: boolean; -} -interface DeleteTaskResponse { - value: boolean; -} -interface SmartWallet { - address: string; - salt: string; - factory: string; -} -interface CreateWalletReq { - salt: string; - factoryAddress?: string; -} -interface Execution { - epoch: number; - userOpHash: string; - error: string; -} -interface TaskEdge { - id: string; - source: string; - target: string; -} - -declare class Task implements TaskType { - id: string; - status: number; - owner: string; - smartWalletAddress: string; - trigger: TaskTrigger; - nodes: TaskNode[]; - edges: TaskEdge[]; - startAt: number; - expiredAt: number; - memo: string; - completedAt: number; - maxExecution: number; - executions: Execution[]; - constructor(task: Task$1); -} - -declare class BaseClient { - readonly endpoint: string; - readonly rpcClient: AggregatorClient; - protected metadata: Metadata; - constructor(opts: ClientOption); - isAuthKeyValid(key: string): boolean; - authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; - authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; - protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; - protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; -} -declare class Client extends BaseClient { - constructor(config: ClientOption); - listSmartWallets(options: RequestOptions): Promise; - createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; - createTask(payload: any, options: RequestOptions): Promise; - listTasks(address: string, options: RequestOptions): Promise; - getTask(id: string, options: RequestOptions): Promise; - cancelTask(id: string, options: RequestOptions): Promise; - deleteTask(id: string, options: RequestOptions): Promise; -} - -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts deleted file mode 100644 index b7d14e6..0000000 --- a/dist/index.d.ts +++ /dev/null @@ -1,1377 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import { Metadata } from '@grpc/grpc-js'; -import * as jspb from 'google-protobuf'; -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; - -declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; - -// package: aggregator -// file: avs.proto - - - -declare class IdReq extends jspb.Message { - getId(): string; - setId(value: string): IdReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): IdReq.AsObject; - static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): IdReq; - static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; -} - -declare namespace IdReq { - export type AsObject = { - id: string, - } -} - -declare class Checkin extends jspb.Message { - getId(): string; - setId(value: string): Checkin; - getAddress(): string; - setAddress(value: string): Checkin; - getSignature(): string; - setSignature(value: string): Checkin; - - hasStatus(): boolean; - clearStatus(): void; - getStatus(): Checkin.Status | undefined; - setStatus(value?: Checkin.Status): Checkin; - getVersion(): string; - setVersion(value: string): Checkin; - getMetricsport(): number; - setMetricsport(value: number): Checkin; - getRemoteip(): string; - setRemoteip(value: string): Checkin; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Checkin.AsObject; - static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Checkin; - static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; -} - -declare namespace Checkin { - export type AsObject = { - id: string, - address: string, - signature: string, - status?: Checkin.Status.AsObject, - version: string, - metricsport: number, - remoteip: string, - } - - - export class Status extends jspb.Message { - getUptime(): number; - setUptime(value: number): Status; - getQueuedepth(): number; - setQueuedepth(value: number): Status; - - hasLastHeartbeat(): boolean; - clearLastHeartbeat(): void; - getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; - } - - export namespace Status { - export type AsObject = { - uptime: number, - queuedepth: number, - lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - } - -} - -declare class CheckinResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckinResp.AsObject; - static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckinResp; - static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; -} - -declare namespace CheckinResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class SyncTasksReq extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksReq; - getAddress(): string; - setAddress(value: string): SyncTasksReq; - getSignature(): string; - setSignature(value: string): SyncTasksReq; - getMonotonicClock(): number; - setMonotonicClock(value: number): SyncTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksReq; - static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; -} - -declare namespace SyncTasksReq { - export type AsObject = { - id: string, - address: string, - signature: string, - monotonicClock: number, - } -} - -declare class FixedEpochCondition extends jspb.Message { - clearEpochsList(): void; - getEpochsList(): Array; - setEpochsList(value: Array): FixedEpochCondition; - addEpochs(value: number, index?: number): number; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; - static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; - static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; -} - -declare namespace FixedEpochCondition { - export type AsObject = { - epochsList: Array, - } -} - -declare class CronCondition extends jspb.Message { - clearScheduleList(): void; - getScheduleList(): Array; - setScheduleList(value: Array): CronCondition; - addSchedule(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CronCondition.AsObject; - static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CronCondition; - static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; -} - -declare namespace CronCondition { - export type AsObject = { - scheduleList: Array, - } -} - -declare class BlockCondition extends jspb.Message { - getInterval(): number; - setInterval(value: number): BlockCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BlockCondition.AsObject; - static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BlockCondition; - static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; -} - -declare namespace BlockCondition { - export type AsObject = { - interval: number, - } -} - -declare class EventCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): EventCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): EventCondition.AsObject; - static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): EventCondition; - static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; -} - -declare namespace EventCondition { - export type AsObject = { - expression: string, - } -} - -declare class TaskTrigger$1 extends jspb.Message { - - hasManual(): boolean; - clearManual(): void; - getManual(): boolean; - setManual(value: boolean): TaskTrigger$1; - - hasFixedTime(): boolean; - clearFixedTime(): void; - getFixedTime(): FixedEpochCondition | undefined; - setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; - - hasCron(): boolean; - clearCron(): void; - getCron(): CronCondition | undefined; - setCron(value?: CronCondition): TaskTrigger$1; - - hasBlock(): boolean; - clearBlock(): void; - getBlock(): BlockCondition | undefined; - setBlock(value?: BlockCondition): TaskTrigger$1; - - hasEvent(): boolean; - clearEvent(): void; - getEvent(): EventCondition | undefined; - setEvent(value?: EventCondition): TaskTrigger$1; - - getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; - static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; -} - -declare namespace TaskTrigger$1 { - export type AsObject = { - manual: boolean, - fixedTime?: FixedEpochCondition.AsObject, - cron?: CronCondition.AsObject, - block?: BlockCondition.AsObject, - event?: EventCondition.AsObject, - } - - export enum TriggerTypeCase { - TRIGGER_TYPE_NOT_SET = 0, - MANUAL = 1, - FIXED_TIME = 2, - CRON = 3, - BLOCK = 4, - EVENT = 5, - } - -} - -declare class SyncTasksResp extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksResp; - getChecktype(): string; - setChecktype(value: string): SyncTasksResp; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger$1 | undefined; - setTrigger(value?: TaskTrigger$1): SyncTasksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksResp; - static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; -} - -declare namespace SyncTasksResp { - export type AsObject = { - id: string, - checktype: string, - trigger?: TaskTrigger$1.AsObject, - } -} - -declare class ETHTransferNode extends jspb.Message { - getDestination(): string; - setDestination(value: string): ETHTransferNode; - getAmount(): string; - setAmount(value: string): ETHTransferNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransferNode.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransferNode; - static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; -} - -declare namespace ETHTransferNode { - export type AsObject = { - destination: string, - amount: string, - } -} - -declare class ContractWriteNode extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractWriteNode; - getCallData(): string; - setCallData(value: string): ContractWriteNode; - getContractAbi(): string; - setContractAbi(value: string): ContractWriteNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractWriteNode.AsObject; - static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractWriteNode; - static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; -} - -declare namespace ContractWriteNode { - export type AsObject = { - contractAddress: string, - callData: string, - contractAbi: string, - } -} - -declare class ContractReadNode extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractReadNode; - getCallData(): string; - setCallData(value: string): ContractReadNode; - getContractAbi(): string; - setContractAbi(value: string): ContractReadNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractReadNode.AsObject; - static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractReadNode; - static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; -} - -declare namespace ContractReadNode { - export type AsObject = { - contractAddress: string, - callData: string, - contractAbi: string, - } -} - -declare class GraphQLQueryNode extends jspb.Message { - getUrl(): string; - setUrl(value: string): GraphQLQueryNode; - getQuery(): string; - setQuery(value: string): GraphQLQueryNode; - - getVariablesMap(): jspb.Map; - clearVariablesMap(): void; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; - static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; -} - -declare namespace GraphQLQueryNode { - export type AsObject = { - url: string, - query: string, - - variablesMap: Array<[string, string]>, - } -} - -declare class RestAPINode extends jspb.Message { - getUrl(): string; - setUrl(value: string): RestAPINode; - - getHeadersMap(): jspb.Map; - clearHeadersMap(): void; - getBody(): string; - setBody(value: string): RestAPINode; - getMethod(): string; - setMethod(value: string): RestAPINode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): RestAPINode.AsObject; - static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): RestAPINode; - static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; -} - -declare namespace RestAPINode { - export type AsObject = { - url: string, - - headersMap: Array<[string, string]>, - body: string, - method: string, - } -} - -declare class CustomCodeNode extends jspb.Message { - getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCodeNode; - getSource(): string; - setSource(value: string): CustomCodeNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCodeNode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCodeNode; - static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; -} - -declare namespace CustomCodeNode { - export type AsObject = { - type: CustomCodeType, - source: string, - } -} - -declare class Condition extends jspb.Message { - getId(): string; - setId(value: string): Condition; - getType(): string; - setType(value: string): Condition; - getExpression(): string; - setExpression(value: string): Condition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Condition.AsObject; - static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Condition; - static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; -} - -declare namespace Condition { - export type AsObject = { - id: string, - type: string, - expression: string, - } -} - -declare class BranchNode extends jspb.Message { - clearConditionsList(): void; - getConditionsList(): Array; - setConditionsList(value: Array): BranchNode; - addConditions(value?: Condition, index?: number): Condition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchNode.AsObject; - static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchNode; - static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; -} - -declare namespace BranchNode { - export type AsObject = { - conditionsList: Array, - } -} - -declare class FilterNode extends jspb.Message { - getExpression(): string; - setExpression(value: string): FilterNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): FilterNode.AsObject; - static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): FilterNode; - static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; -} - -declare namespace FilterNode { - export type AsObject = { - expression: string, - } -} - -declare class LoopNode extends jspb.Message { - getIterVar(): string; - setIterVar(value: string): LoopNode; - getIterKey(): string; - setIterKey(value: string): LoopNode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): LoopNode.AsObject; - static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): LoopNode; - static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; -} - -declare namespace LoopNode { - export type AsObject = { - iterVar: string, - iterKey: string, - } -} - -declare class TaskEdge$1 extends jspb.Message { - getId(): string; - setId(value: string): TaskEdge$1; - getSource(): string; - setSource(value: string): TaskEdge$1; - getTarget(): string; - setTarget(value: string): TaskEdge$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskEdge$1.AsObject; - static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskEdge$1; - static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; -} - -declare namespace TaskEdge$1 { - export type AsObject = { - id: string, - source: string, - target: string, - } -} - -declare class TaskNode$1 extends jspb.Message { - getId(): string; - setId(value: string): TaskNode$1; - getName(): string; - setName(value: string): TaskNode$1; - - hasEthTransfer(): boolean; - clearEthTransfer(): void; - getEthTransfer(): ETHTransferNode | undefined; - setEthTransfer(value?: ETHTransferNode): TaskNode$1; - - hasContractWrite(): boolean; - clearContractWrite(): void; - getContractWrite(): ContractWriteNode | undefined; - setContractWrite(value?: ContractWriteNode): TaskNode$1; - - hasContractRead(): boolean; - clearContractRead(): void; - getContractRead(): ContractReadNode | undefined; - setContractRead(value?: ContractReadNode): TaskNode$1; - - hasGraphqlDataQuery(): boolean; - clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLQueryNode | undefined; - setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; - - hasRestApi(): boolean; - clearRestApi(): void; - getRestApi(): RestAPINode | undefined; - setRestApi(value?: RestAPINode): TaskNode$1; - - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchNode | undefined; - setBranch(value?: BranchNode): TaskNode$1; - - hasFilter(): boolean; - clearFilter(): void; - getFilter(): FilterNode | undefined; - setFilter(value?: FilterNode): TaskNode$1; - - hasLoop(): boolean; - clearLoop(): void; - getLoop(): LoopNode | undefined; - setLoop(value?: LoopNode): TaskNode$1; - - hasCustomCode(): boolean; - clearCustomCode(): void; - getCustomCode(): CustomCodeNode | undefined; - setCustomCode(value?: CustomCodeNode): TaskNode$1; - - getTaskTypeCase(): TaskNode$1.TaskTypeCase; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskNode$1.AsObject; - static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskNode$1; - static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; -} - -declare namespace TaskNode$1 { - export type AsObject = { - id: string, - name: string, - ethTransfer?: ETHTransferNode.AsObject, - contractWrite?: ContractWriteNode.AsObject, - contractRead?: ContractReadNode.AsObject, - graphqlDataQuery?: GraphQLQueryNode.AsObject, - restApi?: RestAPINode.AsObject, - branch?: BranchNode.AsObject, - filter?: FilterNode.AsObject, - loop?: LoopNode.AsObject, - customCode?: CustomCodeNode.AsObject, - } - - export enum TaskTypeCase { - TASK_TYPE_NOT_SET = 0, - ETH_TRANSFER = 10, - CONTRACT_WRITE = 11, - CONTRACT_READ = 12, - GRAPHQL_DATA_QUERY = 13, - REST_API = 14, - BRANCH = 15, - FILTER = 16, - LOOP = 17, - CUSTOM_CODE = 18, - } - -} - -declare class Execution$1 extends jspb.Message { - getEpoch(): number; - setEpoch(value: number): Execution$1; - getUserOpHash(): string; - setUserOpHash(value: string): Execution$1; - getError(): string; - setError(value: string): Execution$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution$1.AsObject; - static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution$1; - static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; -} - -declare namespace Execution$1 { - export type AsObject = { - epoch: number, - userOpHash: string, - error: string, - } -} - -declare class Task$1 extends jspb.Message { - getId(): string; - setId(value: string): Task$1; - getOwner(): string; - setOwner(value: string): Task$1; - getSmartWalletAddress(): string; - setSmartWalletAddress(value: string): Task$1; - getStartAt(): number; - setStartAt(value: number): Task$1; - getExpiredAt(): number; - setExpiredAt(value: number): Task$1; - getMemo(): string; - setMemo(value: string): Task$1; - getCompletedAt(): number; - setCompletedAt(value: number): Task$1; - getMaxExecution(): number; - setMaxExecution(value: number): Task$1; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task$1; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger$1 | undefined; - setTrigger(value?: TaskTrigger$1): Task$1; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task$1; - addNodes(value?: TaskNode$1, index?: number): TaskNode$1; - clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): Task$1; - addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; - clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task$1; - addExecutions(value?: Execution$1, index?: number): Execution$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task$1.AsObject; - static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task$1; - static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; -} - -declare namespace Task$1 { - export type AsObject = { - id: string, - owner: string, - smartWalletAddress: string, - startAt: number, - expiredAt: number, - memo: string, - completedAt: number, - maxExecution: number, - status: TaskStatus, - trigger?: TaskTrigger$1.AsObject, - nodesList: Array, - edgesList: Array, - executionsList: Array, - } -} - -declare class CreateTaskReq extends jspb.Message { - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger$1 | undefined; - setTrigger(value?: TaskTrigger$1): CreateTaskReq; - getStartAt(): number; - setStartAt(value: number): CreateTaskReq; - getExpiredAt(): number; - setExpiredAt(value: number): CreateTaskReq; - getMaxExecution(): number; - setMaxExecution(value: number): CreateTaskReq; - getSmartWalletAddress(): string; - setSmartWalletAddress(value: string): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): CreateTaskReq; - addNodes(value?: TaskNode$1, index?: number): TaskNode$1; - clearEdgesList(): void; - getEdgesList(): Array; - setEdgesList(value: Array): CreateTaskReq; - addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskReq.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskReq; - static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; -} - -declare namespace CreateTaskReq { - export type AsObject = { - trigger?: TaskTrigger$1.AsObject, - startAt: number, - expiredAt: number, - maxExecution: number, - smartWalletAddress: string, - memo: string, - nodesList: Array, - edgesList: Array, - } -} - -declare class CreateTaskResp extends jspb.Message { - getId(): string; - setId(value: string): CreateTaskResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskResp; - static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; -} - -declare namespace CreateTaskResp { - export type AsObject = { - id: string, - } -} - -declare class NonceRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): NonceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceRequest.AsObject; - static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceRequest; - static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; -} - -declare namespace NonceRequest { - export type AsObject = { - owner: string, - } -} - -declare class NonceResp extends jspb.Message { - getNonce(): string; - setNonce(value: string): NonceResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceResp.AsObject; - static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceResp; - static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; -} - -declare namespace NonceResp { - export type AsObject = { - nonce: string, - } -} - -declare class ListWalletReq extends jspb.Message { - getFactory(): string; - setFactory(value: string): ListWalletReq; - getSalt(): string; - setSalt(value: string): ListWalletReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListWalletReq.AsObject; - static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListWalletReq; - static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; -} - -declare namespace ListWalletReq { - export type AsObject = { - factory: string, - salt: string, - } -} - -declare class SmartWallet$1 extends jspb.Message { - getAddress(): string; - setAddress(value: string): SmartWallet$1; - getSalt(): string; - setSalt(value: string): SmartWallet$1; - getFactory(): string; - setFactory(value: string): SmartWallet$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SmartWallet$1.AsObject; - static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SmartWallet$1; - static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; -} - -declare namespace SmartWallet$1 { - export type AsObject = { - address: string, - salt: string, - factory: string, - } -} - -declare class ListWalletResp extends jspb.Message { - clearWalletsList(): void; - getWalletsList(): Array; - setWalletsList(value: Array): ListWalletResp; - addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListWalletResp.AsObject; - static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListWalletResp; - static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; -} - -declare namespace ListWalletResp { - export type AsObject = { - walletsList: Array, - } -} - -declare class ListTasksReq extends jspb.Message { - getSmartWalletAddress(): string; - setSmartWalletAddress(value: string): ListTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksReq; - static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; -} - -declare namespace ListTasksReq { - export type AsObject = { - smartWalletAddress: string, - } -} - -declare class ListTasksResp extends jspb.Message { - clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: Task$1, index?: number): Task$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksResp; - static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; -} - -declare namespace ListTasksResp { - export type AsObject = { - tasksList: Array, - } -} - -declare class GetKeyReq extends jspb.Message { - getOwner(): string; - setOwner(value: string): GetKeyReq; - getExpiredAt(): number; - setExpiredAt(value: number): GetKeyReq; - getSignature(): string; - setSignature(value: string): GetKeyReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyReq.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyReq; - static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; -} - -declare namespace GetKeyReq { - export type AsObject = { - owner: string, - expiredAt: number, - signature: string, - } -} - -declare class KeyResp extends jspb.Message { - getKey(): string; - setKey(value: string): KeyResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyResp.AsObject; - static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyResp; - static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; -} - -declare namespace KeyResp { - export type AsObject = { - key: string, - } -} - -declare class UpdateChecksReq extends jspb.Message { - getAddress(): string; - setAddress(value: string): UpdateChecksReq; - getSignature(): string; - setSignature(value: string): UpdateChecksReq; - clearIdList(): void; - getIdList(): Array; - setIdList(value: Array): UpdateChecksReq; - addId(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; - static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; -} - -declare namespace UpdateChecksReq { - export type AsObject = { - address: string, - signature: string, - idList: Array, - } -} - -declare class UpdateChecksResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; - static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; -} - -declare namespace UpdateChecksResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class CreateWalletReq$1 extends jspb.Message { - getSalt(): string; - setSalt(value: string): CreateWalletReq$1; - getFactoryAddress(): string; - setFactoryAddress(value: string): CreateWalletReq$1; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; - static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; - static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; -} - -declare namespace CreateWalletReq$1 { - export type AsObject = { - salt: string, - factoryAddress: string, - } -} - -declare class CreateWalletResp extends jspb.Message { - getAddress(): string; - setAddress(value: string): CreateWalletResp; - getSalt(): string; - setSalt(value: string): CreateWalletResp; - getFactoryAddress(): string; - setFactoryAddress(value: string): CreateWalletResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateWalletResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateWalletResp; - static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; -} - -declare namespace CreateWalletResp { - export type AsObject = { - address: string, - salt: string, - factoryAddress: string, - } -} - -declare enum TaskStatus { - ACTIVE = 0, - COMPLETED = 1, - FAILED = 2, - CANCELED = 3, - EXECUTING = 4, -} - -declare enum CustomCodeType { - JAVASCRIPT = 0, -} - -// package: aggregator -// file: avs.proto - - - -interface IAggregatorClient { - getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; - syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; -} - -declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); - public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; - public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; - public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; - public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; - public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; - public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; - public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; - public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; - public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; - public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; - public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; - public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; - public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; -} - -type Environment = "production" | "development" | "staging"; -declare const AUTH_KEY_HEADER = "authkey"; -interface RequestOptions { - authKey: string; -} -interface GetKeyResponse { - authKey: string; -} -interface ClientOption { - endpoint: string; -} -interface TaskTrigger { - triggerType: number; - manual?: boolean; - cron?: { - schedule: string[]; - }; - event?: { - expression: string; - }; - fixedTime?: { - epochs: number[]; - }; - block?: { - interval: number; - }; -} -interface TaskNode { - taskType: number; - id: string; - name: string; - ethTransfer?: any; - contractWrite?: any; - contractRead?: any; - restApi?: any; - customCode?: any; - branch?: any; - filter?: any; -} -interface TaskType { - id: string; - owner: string; - smartWalletAddress: string; - trigger: TaskTrigger; - nodes: TaskNode[]; - edges: TaskEdge[]; - startAt: number; - expiredAt: number; - memo: string; - completedAt: number; - status: number; - maxExecution: number; - executions: Execution[]; -} -interface CreateTaskResponse { - id: string; -} -interface ListTasksResponse { - tasks: { - id: string; - status: string; - }[]; -} -interface CancelTaskResponse { - value: boolean; -} -interface DeleteTaskResponse { - value: boolean; -} -interface SmartWallet { - address: string; - salt: string; - factory: string; -} -interface CreateWalletReq { - salt: string; - factoryAddress?: string; -} -interface Execution { - epoch: number; - userOpHash: string; - error: string; -} -interface TaskEdge { - id: string; - source: string; - target: string; -} - -declare class Task implements TaskType { - id: string; - status: number; - owner: string; - smartWalletAddress: string; - trigger: TaskTrigger; - nodes: TaskNode[]; - edges: TaskEdge[]; - startAt: number; - expiredAt: number; - memo: string; - completedAt: number; - maxExecution: number; - executions: Execution[]; - constructor(task: Task$1); -} - -declare class BaseClient { - readonly endpoint: string; - readonly rpcClient: AggregatorClient; - protected metadata: Metadata; - constructor(opts: ClientOption); - isAuthKeyValid(key: string): boolean; - authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; - authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; - protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; - protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; -} -declare class Client extends BaseClient { - constructor(config: ClientOption); - listSmartWallets(options: RequestOptions): Promise; - createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; - createTask(payload: any, options: RequestOptions): Promise; - listTasks(address: string, options: RequestOptions): Promise; - getTask(id: string, options: RequestOptions): Promise; - cancelTask(id: string, options: RequestOptions): Promise; - deleteTask(id: string, options: RequestOptions): Promise; -} - -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index 0b04d1f..0000000 --- a/dist/index.js +++ /dev/null @@ -1,5735 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// grpc_codegen/avs_pb.js -var require_avs_pb = __commonJS({ - "grpc_codegen/avs_pb.js"(exports2) { - "use strict"; - var jspb = require("google-protobuf"); - var goog = jspb; - var global = function() { - if (this) { - return this; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return Function("return this")(); - }.call(null); - var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); - goog.object.extend(proto, google_protobuf_timestamp_pb); - var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); - goog.object.extend(proto, google_protobuf_wrappers_pb); - goog.exportSymbol("proto.aggregator.BlockCondition", null, global); - goog.exportSymbol("proto.aggregator.BranchNode", null, global); - goog.exportSymbol("proto.aggregator.Checkin", null, global); - goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); - goog.exportSymbol("proto.aggregator.CheckinResp", null, global); - goog.exportSymbol("proto.aggregator.Condition", null, global); - goog.exportSymbol("proto.aggregator.ContractReadNode", null, global); - goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); - goog.exportSymbol("proto.aggregator.CreateWalletReq", null, global); - goog.exportSymbol("proto.aggregator.CreateWalletResp", null, global); - goog.exportSymbol("proto.aggregator.CronCondition", null, global); - goog.exportSymbol("proto.aggregator.CustomCodeNode", null, global); - goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); - goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global); - goog.exportSymbol("proto.aggregator.Error", null, global); - goog.exportSymbol("proto.aggregator.EventCondition", null, global); - goog.exportSymbol("proto.aggregator.Execution", null, global); - goog.exportSymbol("proto.aggregator.FilterNode", null, global); - goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); - goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); - goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); - goog.exportSymbol("proto.aggregator.IdReq", null, global); - goog.exportSymbol("proto.aggregator.KeyResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); - goog.exportSymbol("proto.aggregator.ListWalletReq", null, global); - goog.exportSymbol("proto.aggregator.ListWalletResp", null, global); - goog.exportSymbol("proto.aggregator.LoopNode", null, global); - goog.exportSymbol("proto.aggregator.NonceRequest", null, global); - goog.exportSymbol("proto.aggregator.NonceResp", null, global); - goog.exportSymbol("proto.aggregator.RestAPINode", null, global); - goog.exportSymbol("proto.aggregator.SmartWallet", null, global); - goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); - goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); - goog.exportSymbol("proto.aggregator.Task", null, global); - goog.exportSymbol("proto.aggregator.TaskEdge", null, global); - goog.exportSymbol("proto.aggregator.TaskNode", null, global); - goog.exportSymbol("proto.aggregator.TaskNode.TaskTypeCase", null, global); - goog.exportSymbol("proto.aggregator.TaskStatus", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); - proto.aggregator.IdReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.IdReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; - } - proto.aggregator.Checkin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; - } - proto.aggregator.Checkin.Status = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.Status.displayName = "proto.aggregator.Checkin.Status"; - } - proto.aggregator.CheckinResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CheckinResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; - } - proto.aggregator.SyncTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; - } - proto.aggregator.FixedEpochCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; - } - proto.aggregator.CronCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.CronCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; - } - proto.aggregator.BlockCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.BlockCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; - } - proto.aggregator.EventCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.EventCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; - } - proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); - }; - goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; - } - proto.aggregator.SyncTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; - } - proto.aggregator.ETHTransferNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; - } - proto.aggregator.ContractWriteNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; - } - proto.aggregator.ContractReadNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; - } - proto.aggregator.GraphQLQueryNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; - } - proto.aggregator.RestAPINode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.RestAPINode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; - } - proto.aggregator.CustomCodeNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; - } - proto.aggregator.Condition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Condition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; - } - proto.aggregator.BranchNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.BranchNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; - } - proto.aggregator.FilterNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.FilterNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; - } - proto.aggregator.LoopNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.LoopNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; - } - proto.aggregator.TaskEdge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.TaskEdge, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; - } - proto.aggregator.TaskNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); - }; - goog.inherits(proto.aggregator.TaskNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; - } - proto.aggregator.Execution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Execution, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; - } - proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.Task, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Task.displayName = "proto.aggregator.Task"; - } - proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; - } - proto.aggregator.CreateTaskResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskResp.displayName = "proto.aggregator.CreateTaskResp"; - } - proto.aggregator.NonceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceRequest, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; - } - proto.aggregator.NonceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; - } - proto.aggregator.ListWalletReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; - } - proto.aggregator.SmartWallet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SmartWallet, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; - } - proto.aggregator.ListWalletResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; - } - proto.aggregator.ListTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; - } - proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; - } - proto.aggregator.GetKeyReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; - } - proto.aggregator.KeyResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.KeyResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; - } - proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksReq.displayName = "proto.aggregator.UpdateChecksReq"; - } - proto.aggregator.UpdateChecksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; - } - proto.aggregator.CreateWalletReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; - } - proto.aggregator.CreateWalletResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; - } - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.IdReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.IdReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.IdReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.IdReq(); - return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.IdReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.IdReq.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.IdReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 5, ""), - metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin(); - return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = new proto.aggregator.Checkin.Status(); - reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setVersion(value); - break; - case 6: - var value = ( - /** @type {number} */ - reader.readInt32() - ); - msg.setMetricsport(value); - break; - case 7: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setRemoteip(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.Checkin.Status.serializeBinaryToWriter - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMetricsport(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getRemoteip(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { - var f, obj = { - uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), - queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setUptime(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setQueuedepth(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastHeartbeat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUptime(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getQueuedepth(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getLastHeartbeat(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Checkin.Status.prototype.getUptime = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) - ); - }; - proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { - return this.setLastHeartbeat(void 0); - }; - proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.Checkin.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Checkin.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Checkin.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Checkin.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Checkin.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Checkin.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Checkin.prototype.getStatus = function() { - return ( - /** @type{?proto.aggregator.Checkin.Status} */ - jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) - ); - }; - proto.aggregator.Checkin.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Checkin.prototype.clearStatus = function() { - return this.setStatus(void 0); - }; - proto.aggregator.Checkin.prototype.hasStatus = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Checkin.prototype.getVersion = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.Checkin.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.Checkin.prototype.getMetricsport = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) - ); - }; - proto.aggregator.Checkin.prototype.setMetricsport = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); - }; - proto.aggregator.Checkin.prototype.getRemoteip = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 7, "") - ); - }; - proto.aggregator.Checkin.prototype.setRemoteip = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CheckinResp(); - return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CheckinResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq(); - return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMonotonicClock(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMonotonicClock(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - }; - proto.aggregator.SyncTasksReq.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { - var f, obj = { - epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.FixedEpochCondition(); - return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = ( - /** @type {!Array} */ - reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] - ); - for (var i = 0; i < values.length; i++) { - msg.addEpochs(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getEpochsList(); - if (f.length > 0) { - writer.writePackedInt64( - 1, - f - ); - } - }; - proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 1) - ); - }; - proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { - return jspb.Message.setField(this, 1, value || []); - }; - proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); - }; - proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { - return this.setEpochsList([]); - }; - proto.aggregator.CronCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { - var f, obj = { - scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CronCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CronCondition(); - return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addSchedule(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CronCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getScheduleList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - }; - proto.aggregator.CronCondition.prototype.getScheduleList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 1) - ); - }; - proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { - return jspb.Message.setField(this, 1, value || []); - }; - proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); - }; - proto.aggregator.CronCondition.prototype.clearScheduleList = function() { - return this.setScheduleList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { - var f, obj = { - interval: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BlockCondition(); - return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setInterval(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.BlockCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getInterval(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - }; - proto.aggregator.BlockCondition.prototype.getInterval = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.BlockCondition.prototype.setInterval = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.EventCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.EventCondition(); - return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.EventCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.EventCondition.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.EventCondition.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; - proto.aggregator.TaskTrigger.TriggerTypeCase = { - TRIGGER_TYPE_NOT_SET: 0, - MANUAL: 1, - FIXED_TIME: 2, - CRON: 3, - BLOCK: 4, - EVENT: 5 - }; - proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { - return ( - /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */ - jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) - ); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { - var f, obj = { - manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), - cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), - block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), - event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setManual(value); - break; - case 2: - var value = new proto.aggregator.FixedEpochCondition(); - reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); - msg.setFixedTime(value); - break; - case 3: - var value = new proto.aggregator.CronCondition(); - reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); - msg.setCron(value); - break; - case 4: - var value = new proto.aggregator.BlockCondition(); - reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); - msg.setBlock(value); - break; - case 5: - var value = new proto.aggregator.EventCondition(); - reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); - msg.setEvent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = /** @type {boolean} */ - jspb.Message.getField(message, 1); - if (f != null) { - writer.writeBool( - 1, - f - ); - } - f = message.getFixedTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter - ); - } - f = message.getCron(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.CronCondition.serializeBinaryToWriter - ); - } - f = message.getBlock(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.BlockCondition.serializeBinaryToWriter - ); - } - f = message.getEvent(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.aggregator.EventCondition.serializeBinaryToWriter - ); - } - }; - proto.aggregator.TaskTrigger.prototype.getManual = function() { - return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 1, false) - ); - }; - proto.aggregator.TaskTrigger.prototype.setManual = function(value) { - return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearManual = function() { - return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasManual = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { - return ( - /** @type{?proto.aggregator.FixedEpochCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { - return this.setFixedTime(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getCron = function() { - return ( - /** @type{?proto.aggregator.CronCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) - ); - }; - proto.aggregator.TaskTrigger.prototype.setCron = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearCron = function() { - return this.setCron(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasCron = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getBlock = function() { - return ( - /** @type{?proto.aggregator.BlockCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) - ); - }; - proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearBlock = function() { - return this.setBlock(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasBlock = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.TaskTrigger.prototype.getEvent = function() { - return ( - /** @type{?proto.aggregator.EventCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) - ); - }; - proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearEvent = function() { - return this.setEvent(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasEvent = function() { - return jspb.Message.getField(this, 5) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - }; - proto.aggregator.SyncTasksResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) - ); - }; - proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { - var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransferNode(); - return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setDestination(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ETHTransferNode.prototype.getDestination = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ETHTransferNode.prototype.getAmount = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractWriteNode(); - return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallData(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAbi(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getContractAbi(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractWriteNode.prototype.getCallData = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractReadNode(); - return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallData(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAbi(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getContractAbi(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractReadNode.prototype.getCallData = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, ""), - variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLQueryNode(); - return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setQuery(value); - break; - case 3: - var value = msg.getVariablesMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getQuery(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVariablesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - }; - proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { - return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField( - this, - 3, - opt_noLazyCreate, - null - ) - ); - }; - proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { - this.getVariablesMap().clear(); - return this; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); - }; - proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, ""), - method: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.RestAPINode(); - return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBody(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMethod(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.RestAPINode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - }; - proto.aggregator.RestAPINode.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.RestAPINode.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { - return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField( - this, - 2, - opt_noLazyCreate, - null - ) - ); - }; - proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this; - }; - proto.aggregator.RestAPINode.prototype.getBody = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.RestAPINode.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.RestAPINode.prototype.getMethod = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") - ); - }; - proto.aggregator.RestAPINode.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - source: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCodeNode(); - return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.CustomCodeType} */ - reader.readEnum() - ); - msg.setType(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSource(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getSource(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.CustomCodeNode.prototype.getType = function() { - return ( - /** @type {!proto.aggregator.CustomCodeType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.CustomCodeNode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.CustomCodeNode.prototype.getSource = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Condition.toObject(opt_includeInstance, this); - }; - proto.aggregator.Condition.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, ""), - expression: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Condition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Condition(); - return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setType(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Condition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Condition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.Condition.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Condition.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Condition.prototype.getType = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Condition.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Condition.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Condition.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.BranchNode.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { - var f, obj = { - conditionsList: jspb.Message.toObjectList( - msg.getConditionsList(), - proto.aggregator.Condition.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.BranchNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchNode(); - return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.Condition(); - reader.readMessage(value, proto.aggregator.Condition.deserializeBinaryFromReader); - msg.addConditions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.BranchNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getConditionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.Condition.serializeBinaryToWriter - ); - } - }; - proto.aggregator.BranchNode.prototype.getConditionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) - ); - }; - proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); - }; - proto.aggregator.BranchNode.prototype.clearConditionsList = function() { - return this.setConditionsList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.FilterNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.FilterNode(); - return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.FilterNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.FilterNode.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.FilterNode.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { - var f, obj = { - iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), - iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.LoopNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.LoopNode(); - return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setIterVar(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setIterKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.LoopNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getIterVar(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getIterKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.LoopNode.prototype.getIterVar = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.LoopNode.prototype.setIterVar = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.LoopNode.prototype.getIterKey = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.LoopNode.prototype.setIterKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - source: jspb.Message.getFieldWithDefault(msg, 2, ""), - target: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskEdge(); - return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSource(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskEdge.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSource(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTarget(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.TaskEdge.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.TaskEdge.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.TaskEdge.prototype.getSource = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TaskEdge.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.TaskEdge.prototype.getTarget = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.TaskEdge.prototype.setTarget = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; - proto.aggregator.TaskNode.TaskTypeCase = { - TASK_TYPE_NOT_SET: 0, - ETH_TRANSFER: 10, - CONTRACT_WRITE: 11, - CONTRACT_READ: 12, - GRAPHQL_DATA_QUERY: 13, - REST_API: 14, - BRANCH: 15, - FILTER: 16, - LOOP: 17, - CUSTOM_CODE: 18 - }; - proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { - return ( - /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ - jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) - ); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), - contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), - contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), - restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), - filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), - loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskNode(); - return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setName(value); - break; - case 10: - var value = new proto.aggregator.ETHTransferNode(); - reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); - msg.setEthTransfer(value); - break; - case 11: - var value = new proto.aggregator.ContractWriteNode(); - reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); - msg.setContractWrite(value); - break; - case 12: - var value = new proto.aggregator.ContractReadNode(); - reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); - msg.setContractRead(value); - break; - case 13: - var value = new proto.aggregator.GraphQLQueryNode(); - reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); - msg.setGraphqlDataQuery(value); - break; - case 14: - var value = new proto.aggregator.RestAPINode(); - reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); - msg.setRestApi(value); - break; - case 15: - var value = new proto.aggregator.BranchNode(); - reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); - msg.setBranch(value); - break; - case 16: - var value = new proto.aggregator.FilterNode(); - reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); - msg.setFilter(value); - break; - case 17: - var value = new proto.aggregator.LoopNode(); - reader.readMessage(value, proto.aggregator.LoopNode.deserializeBinaryFromReader); - msg.setLoop(value); - break; - case 18: - var value = new proto.aggregator.CustomCodeNode(); - reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); - msg.setCustomCode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEthTransfer(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.ETHTransferNode.serializeBinaryToWriter - ); - } - f = message.getContractWrite(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.aggregator.ContractWriteNode.serializeBinaryToWriter - ); - } - f = message.getContractRead(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.aggregator.ContractReadNode.serializeBinaryToWriter - ); - } - f = message.getGraphqlDataQuery(); - if (f != null) { - writer.writeMessage( - 13, - f, - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter - ); - } - f = message.getRestApi(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.aggregator.RestAPINode.serializeBinaryToWriter - ); - } - f = message.getBranch(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.aggregator.BranchNode.serializeBinaryToWriter - ); - } - f = message.getFilter(); - if (f != null) { - writer.writeMessage( - 16, - f, - proto.aggregator.FilterNode.serializeBinaryToWriter - ); - } - f = message.getLoop(); - if (f != null) { - writer.writeMessage( - 17, - f, - proto.aggregator.LoopNode.serializeBinaryToWriter - ); - } - f = message.getCustomCode(); - if (f != null) { - writer.writeMessage( - 18, - f, - proto.aggregator.CustomCodeNode.serializeBinaryToWriter - ); - } - }; - proto.aggregator.TaskNode.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TaskNode.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.TaskNode.prototype.getName = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.TaskNode.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.TaskNode.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransferNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) - ); - }; - proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { - return this.setEthTransfer(void 0); - }; - proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; - }; - proto.aggregator.TaskNode.prototype.getContractWrite = function() { - return ( - /** @type{?proto.aggregator.ContractWriteNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) - ); - }; - proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearContractWrite = function() { - return this.setContractWrite(void 0); - }; - proto.aggregator.TaskNode.prototype.hasContractWrite = function() { - return jspb.Message.getField(this, 11) != null; - }; - proto.aggregator.TaskNode.prototype.getContractRead = function() { - return ( - /** @type{?proto.aggregator.ContractReadNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) - ); - }; - proto.aggregator.TaskNode.prototype.setContractRead = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearContractRead = function() { - return this.setContractRead(void 0); - }; - proto.aggregator.TaskNode.prototype.hasContractRead = function() { - return jspb.Message.getField(this, 12) != null; - }; - proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { - return ( - /** @type{?proto.aggregator.GraphQLQueryNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) - ); - }; - proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); - }; - proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 13) != null; - }; - proto.aggregator.TaskNode.prototype.getRestApi = function() { - return ( - /** @type{?proto.aggregator.RestAPINode} */ - jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) - ); - }; - proto.aggregator.TaskNode.prototype.setRestApi = function(value) { - return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearRestApi = function() { - return this.setRestApi(void 0); - }; - proto.aggregator.TaskNode.prototype.hasRestApi = function() { - return jspb.Message.getField(this, 14) != null; - }; - proto.aggregator.TaskNode.prototype.getBranch = function() { - return ( - /** @type{?proto.aggregator.BranchNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) - ); - }; - proto.aggregator.TaskNode.prototype.setBranch = function(value) { - return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearBranch = function() { - return this.setBranch(void 0); - }; - proto.aggregator.TaskNode.prototype.hasBranch = function() { - return jspb.Message.getField(this, 15) != null; - }; - proto.aggregator.TaskNode.prototype.getFilter = function() { - return ( - /** @type{?proto.aggregator.FilterNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) - ); - }; - proto.aggregator.TaskNode.prototype.setFilter = function(value) { - return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearFilter = function() { - return this.setFilter(void 0); - }; - proto.aggregator.TaskNode.prototype.hasFilter = function() { - return jspb.Message.getField(this, 16) != null; - }; - proto.aggregator.TaskNode.prototype.getLoop = function() { - return ( - /** @type{?proto.aggregator.LoopNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) - ); - }; - proto.aggregator.TaskNode.prototype.setLoop = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearLoop = function() { - return this.setLoop(void 0); - }; - proto.aggregator.TaskNode.prototype.hasLoop = function() { - return jspb.Message.getField(this, 17) != null; - }; - proto.aggregator.TaskNode.prototype.getCustomCode = function() { - return ( - /** @type{?proto.aggregator.CustomCodeNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) - ); - }; - proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { - return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); - }; - proto.aggregator.TaskNode.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 18) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); - }; - proto.aggregator.Execution.toObject = function(includeInstance, msg) { - var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Execution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution(); - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setEpoch(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUserOpHash(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Execution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.Execution.prototype.getEpoch = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Execution.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Execution.prototype.getUserOpHash = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Execution.prototype.setUserOpHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Execution.prototype.getError = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Execution.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Task.toObject(opt_includeInstance, this); - }; - proto.aggregator.Task.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), - memo: jspb.Message.getFieldWithDefault(msg, 6, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), - status: jspb.Message.getFieldWithDefault(msg, 9, 0), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskNode.toObject, - includeInstance - ), - edgesList: jspb.Message.toObjectList( - msg.getEdgesList(), - proto.aggregator.TaskEdge.toObject, - includeInstance - ), - executionsList: jspb.Message.toObjectList( - msg.getExecutionsList(), - proto.aggregator.Execution.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Task.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Task(); - return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartWalletAddress(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 5: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 6: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 7: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setCompletedAt(value); - break; - case 8: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMaxExecution(value); - break; - case 9: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - case 10: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - case 11: - var value = new proto.aggregator.TaskNode(); - reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 12: - var value = new proto.aggregator.TaskEdge(); - reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); - msg.addEdges(value); - break; - case 13: - var value = new proto.aggregator.Execution(); - reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); - msg.addExecutions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Task.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSmartWalletAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getCompletedAt(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getMaxExecution(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum( - 9, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.aggregator.TaskNode.serializeBinaryToWriter - ); - } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - proto.aggregator.TaskEdge.serializeBinaryToWriter - ); - } - f = message.getExecutionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 13, - f, - proto.aggregator.Execution.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Task.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Task.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Task.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Task.prototype.getSmartWalletAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.Task.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 5, 0) - ); - }; - proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); - }; - proto.aggregator.Task.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 6, "") - ); - }; - proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); - }; - proto.aggregator.Task.prototype.getCompletedAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) - ); - }; - proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); - }; - proto.aggregator.Task.prototype.getMaxExecution = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 8, 0) - ); - }; - proto.aggregator.Task.prototype.setMaxExecution = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); - }; - proto.aggregator.Task.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 9, 0) - ); - }; - proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); - }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 10, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 10) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); - }; - proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); - }; - proto.aggregator.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; - proto.aggregator.Task.prototype.getEdgesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) - ); - }; - proto.aggregator.Task.prototype.setEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); - }; - proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); - }; - proto.aggregator.Task.prototype.clearEdgesList = function() { - return this.setEdgesList([]); - }; - proto.aggregator.Task.prototype.getExecutionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) - ); - }; - proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 13, value); - }; - proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); - }; - proto.aggregator.Task.prototype.clearExecutionsList = function() { - return this.setExecutionsList([]); - }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { - var f, obj = { - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), - smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - memo: jspb.Message.getFieldWithDefault(msg, 6, ""), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskNode.toObject, - includeInstance - ), - edgesList: jspb.Message.toObjectList( - msg.getEdgesList(), - proto.aggregator.TaskEdge.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 3: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMaxExecution(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartWalletAddress(value); - break; - case 6: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 7: - var value = new proto.aggregator.TaskNode(); - reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 8: - var value = new proto.aggregator.TaskEdge(); - reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); - msg.addEdges(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getMaxExecution(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getSmartWalletAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.aggregator.TaskNode.serializeBinaryToWriter - ); - } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.aggregator.TaskEdge.serializeBinaryToWriter - ); - } - }; - proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 3, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); - }; - proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 6, "") - ); - }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); - }; - proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); - }; - proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); - }; - proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; - proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); - }; - proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); - }; - proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { - return this.setEdgesList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.CreateTaskResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateTaskResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceRequest(); - return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.NonceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceRequest.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { - var f, obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.NonceResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceResp(); - return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.NonceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceResp.prototype.getNonce = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { - var f, obj = { - factory: jspb.Message.getFieldWithDefault(msg, 1, ""), - salt: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListWalletReq(); - return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactory(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getFactory(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ListWalletReq.prototype.getFactory = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListWalletReq.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); - }; - proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - salt: jspb.Message.getFieldWithDefault(msg, 2, ""), - factory: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SmartWallet(); - return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactory(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SmartWallet.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFactory(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.SmartWallet.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SmartWallet.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SmartWallet.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SmartWallet.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SmartWallet.prototype.getFactory = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.SmartWallet.prototype.setFactory = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.ListWalletResp.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { - var f, obj = { - walletsList: jspb.Message.toObjectList( - msg.getWalletsList(), - proto.aggregator.SmartWallet.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListWalletResp(); - return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.SmartWallet(); - reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); - msg.addWallets(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getWalletsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.SmartWallet.serializeBinaryToWriter - ); - } - }; - proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) - ); - }; - proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); - }; - proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { - return this.setWalletsList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = { - smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartWalletAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getSmartWalletAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - tasksList: jspb.Message.toObjectList( - msg.getTasksList(), - proto.aggregator.Task.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.Task(); - reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); - msg.addTasks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTasksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.Task.serializeBinaryToWriter - ); - } - }; - proto.aggregator.ListTasksResp.prototype.getTasksList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) - ); - }; - proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); - }; - proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { - return this.setTasksList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GetKeyReq(); - return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.GetKeyReq.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.GetKeyReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.KeyResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.KeyResp(); - return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.KeyResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.KeyResp.prototype.getKey = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.KeyResp.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } - }; - proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 3) - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); - }; - proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); - }; - proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { - var f, obj = { - salt: jspb.Message.getFieldWithDefault(msg, 1, ""), - factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateWalletReq(); - return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactoryAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFactoryAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.CreateWalletReq.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - salt: jspb.Message.getFieldWithDefault(msg, 2, ""), - factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateWalletResp(); - return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactoryAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFactoryAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.CreateWalletResp.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.CreateWalletResp.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Error = { - UNKNOWERROR: 0, - RPCNODEERROR: 1e3, - STORAGEUNAVAILABLE: 2e3, - STORAGEWRITEERROR: 2001, - SMARTWALLETRPCERROR: 6e3, - SMARTWALLETNOTFOUNDERROR: 6001, - TASKDATACORRUPTED: 7e3, - TASKDATAMISSINGERROR: 7001 - }; - proto.aggregator.TaskStatus = { - ACTIVE: 0, - COMPLETED: 1, - FAILED: 2, - CANCELED: 3, - EXECUTING: 4 - }; - proto.aggregator.CustomCodeType = { - JAVASCRIPT: 0 - }; - goog.object.extend(exports2, proto.aggregator); - } -}); - -// grpc_codegen/avs_grpc_pb.js -var require_avs_grpc_pb = __commonJS({ - "grpc_codegen/avs_grpc_pb.js"(exports2) { - "use strict"; - var grpc2 = require("@grpc/grpc-js"); - var avs_pb3 = require_avs_pb(); - var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); - var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); - function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb3.Checkin)) { - throw new Error("Expected argument of type aggregator.Checkin"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb3.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb3.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb3.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateWalletReq(arg) { - if (!(arg instanceof avs_pb3.CreateWalletReq)) { - throw new Error("Expected argument of type aggregator.CreateWalletReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateWalletReq(buffer_arg) { - return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateWalletResp(arg) { - if (!(arg instanceof avs_pb3.CreateWalletResp)) { - throw new Error("Expected argument of type aggregator.CreateWalletResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateWalletResp(buffer_arg) { - return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb3.GetKeyReq)) { - throw new Error("Expected argument of type aggregator.GetKeyReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_IdReq(arg) { - if (!(arg instanceof avs_pb3.IdReq)) { - throw new Error("Expected argument of type aggregator.IdReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_IdReq(buffer_arg) { - return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb3.KeyResp)) { - throw new Error("Expected argument of type aggregator.KeyResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb3.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb3.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListWalletReq(arg) { - if (!(arg instanceof avs_pb3.ListWalletReq)) { - throw new Error("Expected argument of type aggregator.ListWalletReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListWalletReq(buffer_arg) { - return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListWalletResp(arg) { - if (!(arg instanceof avs_pb3.ListWalletResp)) { - throw new Error("Expected argument of type aggregator.ListWalletResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListWalletResp(buffer_arg) { - return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb3.NonceRequest)) { - throw new Error("Expected argument of type aggregator.NonceRequest"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb3.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb3.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb3.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb3.Task)) { - throw new Error("Expected argument of type aggregator.Task"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_Task(buffer_arg) { - return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb3.UpdateChecksReq)) { - throw new Error("Expected argument of type aggregator.UpdateChecksReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb3.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); - } - var AggregatorService = exports2.AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb3.GetKeyReq, - responseType: avs_pb3.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb3.NonceRequest, - responseType: avs_pb3.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - createWallet: { - path: "/aggregator.Aggregator/CreateWallet", - requestStream: false, - responseStream: false, - requestType: avs_pb3.CreateWalletReq, - responseType: avs_pb3.CreateWalletResp, - requestSerialize: serialize_aggregator_CreateWalletReq, - requestDeserialize: deserialize_aggregator_CreateWalletReq, - responseSerialize: serialize_aggregator_CreateWalletResp, - responseDeserialize: deserialize_aggregator_CreateWalletResp - }, - listWallets: { - path: "/aggregator.Aggregator/ListWallets", - requestStream: false, - responseStream: false, - requestType: avs_pb3.ListWalletReq, - responseType: avs_pb3.ListWalletResp, - requestSerialize: serialize_aggregator_ListWalletReq, - requestDeserialize: deserialize_aggregator_ListWalletReq, - responseSerialize: serialize_aggregator_ListWalletResp, - responseDeserialize: deserialize_aggregator_ListWalletResp - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.CreateTaskReq, - responseType: avs_pb3.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb3.ListTasksReq, - responseType: avs_pb3.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.IdReq, - responseType: avs_pb3.Task, - requestSerialize: serialize_aggregator_IdReq, - requestDeserialize: deserialize_aggregator_IdReq, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.IdReq, - responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_IdReq, - requestDeserialize: deserialize_aggregator_IdReq, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.IdReq, - responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_IdReq, - requestDeserialize: deserialize_aggregator_IdReq, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb3.Checkin, - responseType: avs_pb3.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb3.SyncTasksReq, - responseType: avs_pb3.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb3.UpdateChecksReq, - responseType: avs_pb3.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp - } - }; - exports2.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); - } -}); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - AUTH_KEY_HEADER: () => AUTH_KEY_HEADER, - default: () => Client, - getKeyRequestMessage: () => getKeyRequestMessage -}); -module.exports = __toCommonJS(src_exports); -var import_lodash = __toESM(require("lodash")); -var grpc = __toESM(require("@grpc/grpc-js")); -var import_grpc_js = require("@grpc/grpc-js"); - -// src/auth.ts -var getKeyRequestMessage = (address, expiredAt) => { - return `key request for ${address} expired at ${expiredAt}`; -}; - -// src/index.ts -var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); -var avs_pb2 = __toESM(require_avs_pb()); - -// src/builder.ts -var avs_pb = __toESM(require_avs_pb()); -var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { - const n = new avs_pb.ContractWriteNode(); - n.setContractAddress(contractAddress2); - n.setCallData(callData); - if (contractABI) { - n.setContractAbi(contractABI); - } - return n; -}; -var buildContractRead = ({ contract_ddress, callData, contractABI }) => { - const n = new avs_pb.ContractReadNode(); - n.setContractAddress(contractAddress); - n.setCallData(callData); - if (n.contractABI) { - n.setContractAbi(n.contractABI); - } - return n; -}; -var buildGraphQL = ({ url, query, variables }) => { - const n = new avs_pb.GraphQLQueryNode(); - n.setUrl(url); - n.setQuery(query); - for (const [k, v] of Object.entries(variables || {})) { - n.getVariablesMap().set(k, v); - } - return n; -}; -var buildRestAPI = ({ url, body, method, headers }) => { - const n = new avs_pb.RestAPINode(); - n.setUrl(url); - n.setBody(body); - n.setMethod(method); - for (const [k, v] of Object.entries(headers || {})) { - n.getHeadersMap().set(k, v); - } - return n; -}; -var buildBranch = ({ conditions }) => { - const n = new avs_pb.BranchNode(); - for (const item of conditions) { - const condition = new avs_pb.Condition(); - condition.setId(item.id); - condition.setType(item.type); - condition.setExpression(item.expression); - n.addConditions(condition); - } - return n; -}; -var buildFilter = ({ expression }) => { - const n = new avs_pb.FilterNode(); - n.setExpression(expression); - return n; -}; -var buildTaskEdge = ({ id, source, target }) => { - const edge = new avs_pb.TaskEdge(); - edge.setId(id); - edge.setSource(source); - edge.setTarget(target); - return edge; -}; -var buildTaskNode = (node) => { - const n = new avs_pb.TaskNode(); - n.setId(node.id); - n.setName(node.name); - if (node.ethTransfer) { - const ethTransfer = new avs_pb.ETHTransferNode(); - ethTransfer.setDestination(node.ethTransfer.destination); - ethTransfer.setAmount(node.ethTransfer.amount); - n.setEthTransfer(ethTransfer); - } else if (node.contractWrite) { - n.setContractWrite(buildContractWrite(node.contractWrite)); - } else if (node.contractRead) { - n.setContractRead(buildContractRead(node.contractRead)); - } else if (node.graphqlDataQuery) { - n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); - } else if (node.restApi) { - n.setRestApi(buildRestAPI(node.restApi)); - } else if (node.branch) { - n.setBranch(buildBranch(node.branch)); - } else if (node["filter"]) { - n.setfilter(buildFilter(node["filter"])); - } else if (node.customCode) { - const code = new avs_pb.CustomCodeNode(); - code.setType(node.customCode.type); - n.setCustomCode(node.customCode); - } else { - throw new Error("missing task payload"); - } - return n; -}; -var buildTrigger = (payload) => { - const trigger = new avs_pb.TaskTrigger(); - for (const [key, value] of Object.entries(payload)) { - if (key == "manual") { - trigger.setManual(value); - return trigger; - } - if (key == "fixedTime") { - let schedule = new avs_pb.FixedEpochCondition(); - schedule.setEpochsList(value.epochs); - trigger.setFixedTime(schedule); - return trigger; - } - if (key == "cron") { - const cron = new avs_pb.CronCondition(); - cron.setScheduleList(value.schedule); - trigger.setCron(cron); - return trigger; - } - if (key == "block") { - const block = new avs_pb.BlockCondition(); - block.setInterval(value.interval); - trigger.setBlock(block); - return trigger; - } - if (key == "event") { - const event = new avs_pb.EventCondition(); - event.setExpression(payload.event.expression); - trigger.setEvent(event); - return trigger; - } - throw new Error("missing trigger"); - } -}; -var triggerFromGRPC = (trigger) => { - if (!trigger) { - return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; - } - const base = { - triggerType: trigger.getTriggerTypeCase() - }; - switch (trigger.getTriggerTypeCase()) { - case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: - base.manual = trigger.getManual(); - break; - case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: - base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; - break; - case avs_pb.TaskTrigger.TriggerTypeCase.CRON: - base.cron = { schedule: trigger.getCron().getScheduleList() }; - break; - case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: - base.block = { interval: trigger.getBlock().getInterval() }; - break; - case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: - base.event = { expression: trigger.getEvent().getExpression() }; - break; - } - return base; -}; -var nodeFromGRPC = (node) => { - const base = node.toObject(); - const standarize = { - taskType: node.getTaskTypeCase() - }; - switch (node.getTaskTypeCase()) { - case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: - standarize.ethTransfer = base.ethTransfer; - break; - case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: - standarize.contractWrite = base.contractWrite; - break; - case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: - standarize.contractRead = base.contractRead; - break; - case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: - standarize.graphqlDataQuery = base.graphqlDataQuery; - break; - case avs_pb.TaskNode.TaskTypeCase.REST_API: - standarize.restApi = base.restApi; - break; - case avs_pb.TaskNode.TaskTypeCase.BRANCH: - standarize.branch = { - conditions: base.branch.conditionsList - }; - break; - case avs_pb.TaskNode.TaskTypeCase.FILTER: - standarize.filter = base.filter; - break; - case avs_pb.TaskNode.TaskTypeCase.LOOP: - standarize.loop = base.loop; - break; - case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: - standarize.custom_code = base.custom_code; - break; - } - return standarize; -}; -var taskEdgeFromGRPC = (edge) => { - return { - id: edge.getId(), - source: edge.getSource(), - target: edge.getTarget() - }; -}; - -// src/task.ts -var Task = class { - constructor(task) { - this.id = task.getId() || ""; - this.status = task.getStatus(); - this.owner = task.getOwner(); - this.smartWalletAddress = task.getSmartWalletAddress(); - this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); - this.trigger = triggerFromGRPC(task.getTrigger()); - this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); - this.startAt = task.getStartAt(); - this.expiredAt = task.getExpiredAt(); - this.memo = task.getMemo(); - this.completedAt = task.getCompletedAt(); - this.status = task.getStatus(); - this.executions = task.getExecutionsList().map((execution) => { - return { - epoch: execution.getEpoch(), - userOpHash: execution.getUserOpHash(), - error: execution.getError() - }; - }); - this.maxExecution = task.getMaxExecution(); - } -}; -var task_default = Task; - -// src/types.ts -var AUTH_KEY_HEADER = "authkey"; - -// src/index.ts -var BaseClient = class { - constructor(opts) { - this.endpoint = opts.endpoint; - this.rpcClient = new import_avs_grpc_pb.AggregatorClient( - this.endpoint, - grpc.credentials.createInsecure() - ); - this.metadata = new import_grpc_js.Metadata(); - } - isAuthKeyValid(key) { - try { - const [, payload] = key.split("."); - const decodedPayload = JSON.parse(atob(payload)); - const currentTimestamp = Math.floor(Date.now() / 1e3); - return decodedPayload.exp > currentTimestamp; - } catch (error) { - console.error("Error validating auth key:", error); - return false; - } - } - // When using the APIkey, depends on scope of the key, it may have access to one ore more account - async authWithAPIKey(address, apiKey, expiredAtEpoch) { - const request = new avs_pb2.GetKeyReq(); - request.setOwner(address); - request.setExpiredAt(expiredAtEpoch); - request.setSignature(apiKey); - const result = await this._callAnonRPC("getKey", request); - return { authKey: result.getKey() }; - } - // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address, signature, expiredAtEpoch) { - const request = new avs_pb2.GetKeyReq(); - request.setOwner(address); - request.setExpiredAt(expiredAtEpoch); - request.setSignature(signature); - let result = await this._callAnonRPC( - "getKey", - request - ); - return { authKey: result.getKey() }; - } - _callRPC(method, request, options) { - const metadata = import_lodash.default.cloneDeep(this.metadata); - if (!options?.authKey) { - throw new Error("missing auth header"); - } - metadata.set(AUTH_KEY_HEADER, options.authKey); - return new Promise((resolve, reject) => { - this.rpcClient[method].bind(this.rpcClient)( - request, - metadata, - (error, response) => { - if (error) reject(error); - else resolve(response); - } - ); - }); - } - _callAnonRPC(method, request, options) { - const metadata = import_lodash.default.cloneDeep(this.metadata); - return new Promise((resolve, reject) => { - this.rpcClient[method].bind(this.rpcClient)( - request, - metadata, - (error, response) => { - if (error) reject(error); - else resolve(response); - } - ); - }); - } -}; -var Client = class extends BaseClient { - constructor(config) { - super(config); - } - async listSmartWallets(options) { - const request = new avs_pb2.ListWalletReq(); - const result = await this._callRPC("listWallets", request, options); - return result.getWalletsList().map((item) => item.toObject()); - } - async createWallet({ - salt, - factoryAddress - }, options) { - const request = new avs_pb2.CreateWalletReq(); - request.setSalt(salt); - if (factoryAddress) { - request.setFactoryAddress(factoryAddress); - } - const result = await this._callRPC("createWallet", request, options); - return { - address: result.getAddress(), - salt: result.getSalt(), - factory: result.getFactoryAddress() - }; - } - async createTask(payload, options) { - const request = new avs_pb2.CreateTaskReq(); - request.setSmartWalletAddress(payload.smartWalletAddress); - request.setStartAt(payload.startAt); - request.setExpiredAt(payload.expiredAt || -1); - request.setMemo(payload.memo || ""); - request.setMaxExecution(payload.maxExecution || 0); - request.setTrigger(buildTrigger(payload.trigger)); - for (const node of payload.nodes) { - request.addNodes(buildTaskNode(node)); - } - const edges = []; - for (const edge of payload.edges) { - edges.push(buildTaskEdge(edge)); - } - request.setEdgesList(edges); - const result = await this._callRPC("createTask", request, options); - return result.getId(); - } - async listTasks(address, options) { - const request = new avs_pb2.ListTasksReq(); - request.setSmartWalletAddress(address); - const result = await this._callRPC("listTasks", request, options); - return result.getTasksList().map((item) => new task_default(item)); - } - // TODO: specify the return type to match client’s requirements - async getTask(id, options) { - const request = new avs_pb2.IdReq(); - request.setId(id); - const result = await this._callRPC( - "getTask", - request, - options - ); - return new task_default(result); - } - async cancelTask(id, options) { - const request = new avs_pb2.IdReq(); - request.setId(id); - const result = await this._callRPC( - "cancelTask", - request, - options - ); - return result.getValue(); - } - async deleteTask(id, options) { - const request = new avs_pb2.IdReq(); - request.setId(id); - const result = await this._callRPC( - "deleteTask", - request, - options - ); - return result.getValue(); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - AUTH_KEY_HEADER, - getKeyRequestMessage -}); diff --git a/dist/index.mjs b/dist/index.mjs deleted file mode 100644 index b0b0208..0000000 --- a/dist/index.mjs +++ /dev/null @@ -1,5728 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { - get: (a, b) => (typeof require !== "undefined" ? require : a)[b] -}) : x)(function(x) { - if (typeof require !== "undefined") return require.apply(this, arguments); - throw Error('Dynamic require of "' + x + '" is not supported'); -}); -var __commonJS = (cb, mod) => function __require2() { - return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); - -// grpc_codegen/avs_pb.js -var require_avs_pb = __commonJS({ - "grpc_codegen/avs_pb.js"(exports) { - "use strict"; - var jspb = __require("google-protobuf"); - var goog = jspb; - var global = function() { - if (this) { - return this; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return Function("return this")(); - }.call(null); - var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); - goog.object.extend(proto, google_protobuf_timestamp_pb); - var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); - goog.object.extend(proto, google_protobuf_wrappers_pb); - goog.exportSymbol("proto.aggregator.BlockCondition", null, global); - goog.exportSymbol("proto.aggregator.BranchNode", null, global); - goog.exportSymbol("proto.aggregator.Checkin", null, global); - goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); - goog.exportSymbol("proto.aggregator.CheckinResp", null, global); - goog.exportSymbol("proto.aggregator.Condition", null, global); - goog.exportSymbol("proto.aggregator.ContractReadNode", null, global); - goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); - goog.exportSymbol("proto.aggregator.CreateWalletReq", null, global); - goog.exportSymbol("proto.aggregator.CreateWalletResp", null, global); - goog.exportSymbol("proto.aggregator.CronCondition", null, global); - goog.exportSymbol("proto.aggregator.CustomCodeNode", null, global); - goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); - goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global); - goog.exportSymbol("proto.aggregator.Error", null, global); - goog.exportSymbol("proto.aggregator.EventCondition", null, global); - goog.exportSymbol("proto.aggregator.Execution", null, global); - goog.exportSymbol("proto.aggregator.FilterNode", null, global); - goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); - goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); - goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); - goog.exportSymbol("proto.aggregator.IdReq", null, global); - goog.exportSymbol("proto.aggregator.KeyResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); - goog.exportSymbol("proto.aggregator.ListWalletReq", null, global); - goog.exportSymbol("proto.aggregator.ListWalletResp", null, global); - goog.exportSymbol("proto.aggregator.LoopNode", null, global); - goog.exportSymbol("proto.aggregator.NonceRequest", null, global); - goog.exportSymbol("proto.aggregator.NonceResp", null, global); - goog.exportSymbol("proto.aggregator.RestAPINode", null, global); - goog.exportSymbol("proto.aggregator.SmartWallet", null, global); - goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); - goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); - goog.exportSymbol("proto.aggregator.Task", null, global); - goog.exportSymbol("proto.aggregator.TaskEdge", null, global); - goog.exportSymbol("proto.aggregator.TaskNode", null, global); - goog.exportSymbol("proto.aggregator.TaskNode.TaskTypeCase", null, global); - goog.exportSymbol("proto.aggregator.TaskStatus", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); - goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); - proto.aggregator.IdReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.IdReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; - } - proto.aggregator.Checkin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; - } - proto.aggregator.Checkin.Status = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.Status.displayName = "proto.aggregator.Checkin.Status"; - } - proto.aggregator.CheckinResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CheckinResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; - } - proto.aggregator.SyncTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; - } - proto.aggregator.FixedEpochCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; - } - proto.aggregator.CronCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.CronCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; - } - proto.aggregator.BlockCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.BlockCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; - } - proto.aggregator.EventCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.EventCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; - } - proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); - }; - goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; - } - proto.aggregator.SyncTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; - } - proto.aggregator.ETHTransferNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; - } - proto.aggregator.ContractWriteNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; - } - proto.aggregator.ContractReadNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; - } - proto.aggregator.GraphQLQueryNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; - } - proto.aggregator.RestAPINode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.RestAPINode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; - } - proto.aggregator.CustomCodeNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; - } - proto.aggregator.Condition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Condition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; - } - proto.aggregator.BranchNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.BranchNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; - } - proto.aggregator.FilterNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.FilterNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; - } - proto.aggregator.LoopNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.LoopNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; - } - proto.aggregator.TaskEdge = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.TaskEdge, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; - } - proto.aggregator.TaskNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); - }; - goog.inherits(proto.aggregator.TaskNode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; - } - proto.aggregator.Execution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Execution, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; - } - proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.Task, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Task.displayName = "proto.aggregator.Task"; - } - proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; - } - proto.aggregator.CreateTaskResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskResp.displayName = "proto.aggregator.CreateTaskResp"; - } - proto.aggregator.NonceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceRequest, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; - } - proto.aggregator.NonceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; - } - proto.aggregator.ListWalletReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; - } - proto.aggregator.SmartWallet = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SmartWallet, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; - } - proto.aggregator.ListWalletResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; - } - proto.aggregator.ListTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; - } - proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; - } - proto.aggregator.GetKeyReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; - } - proto.aggregator.KeyResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.KeyResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; - } - proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksReq.displayName = "proto.aggregator.UpdateChecksReq"; - } - proto.aggregator.UpdateChecksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; - } - proto.aggregator.CreateWalletReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; - } - proto.aggregator.CreateWalletResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; - } - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.IdReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.IdReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.IdReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.IdReq(); - return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.IdReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.IdReq.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.IdReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 5, ""), - metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin(); - return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = new proto.aggregator.Checkin.Status(); - reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setVersion(value); - break; - case 6: - var value = ( - /** @type {number} */ - reader.readInt32() - ); - msg.setMetricsport(value); - break; - case 7: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setRemoteip(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.Checkin.Status.serializeBinaryToWriter - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMetricsport(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getRemoteip(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { - var f, obj = { - uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), - queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setUptime(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setQueuedepth(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastHeartbeat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUptime(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getQueuedepth(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getLastHeartbeat(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Checkin.Status.prototype.getUptime = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) - ); - }; - proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { - return this.setLastHeartbeat(void 0); - }; - proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.Checkin.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Checkin.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Checkin.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Checkin.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Checkin.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Checkin.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Checkin.prototype.getStatus = function() { - return ( - /** @type{?proto.aggregator.Checkin.Status} */ - jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) - ); - }; - proto.aggregator.Checkin.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Checkin.prototype.clearStatus = function() { - return this.setStatus(void 0); - }; - proto.aggregator.Checkin.prototype.hasStatus = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Checkin.prototype.getVersion = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.Checkin.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.Checkin.prototype.getMetricsport = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) - ); - }; - proto.aggregator.Checkin.prototype.setMetricsport = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); - }; - proto.aggregator.Checkin.prototype.getRemoteip = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 7, "") - ); - }; - proto.aggregator.Checkin.prototype.setRemoteip = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CheckinResp(); - return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CheckinResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq(); - return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMonotonicClock(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMonotonicClock(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - }; - proto.aggregator.SyncTasksReq.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { - var f, obj = { - epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.FixedEpochCondition(); - return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var values = ( - /** @type {!Array} */ - reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] - ); - for (var i = 0; i < values.length; i++) { - msg.addEpochs(values[i]); - } - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getEpochsList(); - if (f.length > 0) { - writer.writePackedInt64( - 1, - f - ); - } - }; - proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 1) - ); - }; - proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { - return jspb.Message.setField(this, 1, value || []); - }; - proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); - }; - proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { - return this.setEpochsList([]); - }; - proto.aggregator.CronCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { - var f, obj = { - scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CronCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CronCondition(); - return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addSchedule(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CronCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getScheduleList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - }; - proto.aggregator.CronCondition.prototype.getScheduleList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 1) - ); - }; - proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { - return jspb.Message.setField(this, 1, value || []); - }; - proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); - }; - proto.aggregator.CronCondition.prototype.clearScheduleList = function() { - return this.setScheduleList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { - var f, obj = { - interval: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BlockCondition(); - return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setInterval(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.BlockCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getInterval(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - }; - proto.aggregator.BlockCondition.prototype.getInterval = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.BlockCondition.prototype.setInterval = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.EventCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.EventCondition(); - return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.EventCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.EventCondition.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.EventCondition.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; - proto.aggregator.TaskTrigger.TriggerTypeCase = { - TRIGGER_TYPE_NOT_SET: 0, - MANUAL: 1, - FIXED_TIME: 2, - CRON: 3, - BLOCK: 4, - EVENT: 5 - }; - proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { - return ( - /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */ - jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) - ); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { - var f, obj = { - manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), - cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), - block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), - event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setManual(value); - break; - case 2: - var value = new proto.aggregator.FixedEpochCondition(); - reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); - msg.setFixedTime(value); - break; - case 3: - var value = new proto.aggregator.CronCondition(); - reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); - msg.setCron(value); - break; - case 4: - var value = new proto.aggregator.BlockCondition(); - reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); - msg.setBlock(value); - break; - case 5: - var value = new proto.aggregator.EventCondition(); - reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); - msg.setEvent(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = /** @type {boolean} */ - jspb.Message.getField(message, 1); - if (f != null) { - writer.writeBool( - 1, - f - ); - } - f = message.getFixedTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter - ); - } - f = message.getCron(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.CronCondition.serializeBinaryToWriter - ); - } - f = message.getBlock(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.BlockCondition.serializeBinaryToWriter - ); - } - f = message.getEvent(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.aggregator.EventCondition.serializeBinaryToWriter - ); - } - }; - proto.aggregator.TaskTrigger.prototype.getManual = function() { - return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 1, false) - ); - }; - proto.aggregator.TaskTrigger.prototype.setManual = function(value) { - return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearManual = function() { - return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasManual = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { - return ( - /** @type{?proto.aggregator.FixedEpochCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { - return this.setFixedTime(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getCron = function() { - return ( - /** @type{?proto.aggregator.CronCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) - ); - }; - proto.aggregator.TaskTrigger.prototype.setCron = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearCron = function() { - return this.setCron(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasCron = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getBlock = function() { - return ( - /** @type{?proto.aggregator.BlockCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) - ); - }; - proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearBlock = function() { - return this.setBlock(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasBlock = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.TaskTrigger.prototype.getEvent = function() { - return ( - /** @type{?proto.aggregator.EventCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) - ); - }; - proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); - }; - proto.aggregator.TaskTrigger.prototype.clearEvent = function() { - return this.setEvent(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasEvent = function() { - return jspb.Message.getField(this, 5) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - }; - proto.aggregator.SyncTasksResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) - ); - }; - proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { - var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransferNode(); - return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setDestination(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ETHTransferNode.prototype.getDestination = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ETHTransferNode.prototype.getAmount = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractWriteNode(); - return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallData(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAbi(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getContractAbi(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractWriteNode.prototype.getCallData = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractReadNode(); - return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallData(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAbi(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getContractAbi(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractReadNode.prototype.getCallData = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, ""), - variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLQueryNode(); - return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setQuery(value); - break; - case 3: - var value = msg.getVariablesMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getQuery(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVariablesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - }; - proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { - return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField( - this, - 3, - opt_noLazyCreate, - null - ) - ); - }; - proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { - this.getVariablesMap().clear(); - return this; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); - }; - proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, ""), - method: jspb.Message.getFieldWithDefault(msg, 4, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.RestAPINode(); - return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBody(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMethod(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.RestAPINode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - }; - proto.aggregator.RestAPINode.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.RestAPINode.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { - return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField( - this, - 2, - opt_noLazyCreate, - null - ) - ); - }; - proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this; - }; - proto.aggregator.RestAPINode.prototype.getBody = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.RestAPINode.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.RestAPINode.prototype.getMethod = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") - ); - }; - proto.aggregator.RestAPINode.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - source: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCodeNode(); - return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.CustomCodeType} */ - reader.readEnum() - ); - msg.setType(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSource(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getSource(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.CustomCodeNode.prototype.getType = function() { - return ( - /** @type {!proto.aggregator.CustomCodeType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.CustomCodeNode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.CustomCodeNode.prototype.getSource = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Condition.toObject(opt_includeInstance, this); - }; - proto.aggregator.Condition.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, ""), - expression: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Condition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Condition(); - return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setType(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Condition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Condition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getType(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.Condition.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Condition.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Condition.prototype.getType = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Condition.prototype.setType = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Condition.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Condition.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.BranchNode.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { - var f, obj = { - conditionsList: jspb.Message.toObjectList( - msg.getConditionsList(), - proto.aggregator.Condition.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.BranchNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchNode(); - return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.Condition(); - reader.readMessage(value, proto.aggregator.Condition.deserializeBinaryFromReader); - msg.addConditions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.BranchNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getConditionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.Condition.serializeBinaryToWriter - ); - } - }; - proto.aggregator.BranchNode.prototype.getConditionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) - ); - }; - proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); - }; - proto.aggregator.BranchNode.prototype.clearConditionsList = function() { - return this.setConditionsList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.FilterNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.FilterNode(); - return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.FilterNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.FilterNode.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.FilterNode.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { - var f, obj = { - iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), - iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.LoopNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.LoopNode(); - return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setIterVar(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setIterKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.LoopNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getIterVar(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getIterKey(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.LoopNode.prototype.getIterVar = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.LoopNode.prototype.setIterVar = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.LoopNode.prototype.getIterKey = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.LoopNode.prototype.setIterKey = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - source: jspb.Message.getFieldWithDefault(msg, 2, ""), - target: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskEdge(); - return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSource(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setTarget(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskEdge.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSource(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTarget(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.TaskEdge.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.TaskEdge.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.TaskEdge.prototype.getSource = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TaskEdge.prototype.setSource = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.TaskEdge.prototype.getTarget = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.TaskEdge.prototype.setTarget = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; - proto.aggregator.TaskNode.TaskTypeCase = { - TASK_TYPE_NOT_SET: 0, - ETH_TRANSFER: 10, - CONTRACT_WRITE: 11, - CONTRACT_READ: 12, - GRAPHQL_DATA_QUERY: 13, - REST_API: 14, - BRANCH: 15, - FILTER: 16, - LOOP: 17, - CUSTOM_CODE: 18 - }; - proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { - return ( - /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ - jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) - ); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), - contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), - contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), - restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), - filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), - loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskNode(); - return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setName(value); - break; - case 10: - var value = new proto.aggregator.ETHTransferNode(); - reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); - msg.setEthTransfer(value); - break; - case 11: - var value = new proto.aggregator.ContractWriteNode(); - reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); - msg.setContractWrite(value); - break; - case 12: - var value = new proto.aggregator.ContractReadNode(); - reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); - msg.setContractRead(value); - break; - case 13: - var value = new proto.aggregator.GraphQLQueryNode(); - reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); - msg.setGraphqlDataQuery(value); - break; - case 14: - var value = new proto.aggregator.RestAPINode(); - reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); - msg.setRestApi(value); - break; - case 15: - var value = new proto.aggregator.BranchNode(); - reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); - msg.setBranch(value); - break; - case 16: - var value = new proto.aggregator.FilterNode(); - reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); - msg.setFilter(value); - break; - case 17: - var value = new proto.aggregator.LoopNode(); - reader.readMessage(value, proto.aggregator.LoopNode.deserializeBinaryFromReader); - msg.setLoop(value); - break; - case 18: - var value = new proto.aggregator.CustomCodeNode(); - reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); - msg.setCustomCode(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEthTransfer(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.ETHTransferNode.serializeBinaryToWriter - ); - } - f = message.getContractWrite(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.aggregator.ContractWriteNode.serializeBinaryToWriter - ); - } - f = message.getContractRead(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.aggregator.ContractReadNode.serializeBinaryToWriter - ); - } - f = message.getGraphqlDataQuery(); - if (f != null) { - writer.writeMessage( - 13, - f, - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter - ); - } - f = message.getRestApi(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.aggregator.RestAPINode.serializeBinaryToWriter - ); - } - f = message.getBranch(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.aggregator.BranchNode.serializeBinaryToWriter - ); - } - f = message.getFilter(); - if (f != null) { - writer.writeMessage( - 16, - f, - proto.aggregator.FilterNode.serializeBinaryToWriter - ); - } - f = message.getLoop(); - if (f != null) { - writer.writeMessage( - 17, - f, - proto.aggregator.LoopNode.serializeBinaryToWriter - ); - } - f = message.getCustomCode(); - if (f != null) { - writer.writeMessage( - 18, - f, - proto.aggregator.CustomCodeNode.serializeBinaryToWriter - ); - } - }; - proto.aggregator.TaskNode.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TaskNode.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.TaskNode.prototype.getName = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.TaskNode.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.TaskNode.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransferNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) - ); - }; - proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { - return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { - return this.setEthTransfer(void 0); - }; - proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; - }; - proto.aggregator.TaskNode.prototype.getContractWrite = function() { - return ( - /** @type{?proto.aggregator.ContractWriteNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) - ); - }; - proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearContractWrite = function() { - return this.setContractWrite(void 0); - }; - proto.aggregator.TaskNode.prototype.hasContractWrite = function() { - return jspb.Message.getField(this, 11) != null; - }; - proto.aggregator.TaskNode.prototype.getContractRead = function() { - return ( - /** @type{?proto.aggregator.ContractReadNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) - ); - }; - proto.aggregator.TaskNode.prototype.setContractRead = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearContractRead = function() { - return this.setContractRead(void 0); - }; - proto.aggregator.TaskNode.prototype.hasContractRead = function() { - return jspb.Message.getField(this, 12) != null; - }; - proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { - return ( - /** @type{?proto.aggregator.GraphQLQueryNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) - ); - }; - proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); - }; - proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 13) != null; - }; - proto.aggregator.TaskNode.prototype.getRestApi = function() { - return ( - /** @type{?proto.aggregator.RestAPINode} */ - jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) - ); - }; - proto.aggregator.TaskNode.prototype.setRestApi = function(value) { - return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearRestApi = function() { - return this.setRestApi(void 0); - }; - proto.aggregator.TaskNode.prototype.hasRestApi = function() { - return jspb.Message.getField(this, 14) != null; - }; - proto.aggregator.TaskNode.prototype.getBranch = function() { - return ( - /** @type{?proto.aggregator.BranchNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) - ); - }; - proto.aggregator.TaskNode.prototype.setBranch = function(value) { - return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearBranch = function() { - return this.setBranch(void 0); - }; - proto.aggregator.TaskNode.prototype.hasBranch = function() { - return jspb.Message.getField(this, 15) != null; - }; - proto.aggregator.TaskNode.prototype.getFilter = function() { - return ( - /** @type{?proto.aggregator.FilterNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) - ); - }; - proto.aggregator.TaskNode.prototype.setFilter = function(value) { - return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearFilter = function() { - return this.setFilter(void 0); - }; - proto.aggregator.TaskNode.prototype.hasFilter = function() { - return jspb.Message.getField(this, 16) != null; - }; - proto.aggregator.TaskNode.prototype.getLoop = function() { - return ( - /** @type{?proto.aggregator.LoopNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) - ); - }; - proto.aggregator.TaskNode.prototype.setLoop = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearLoop = function() { - return this.setLoop(void 0); - }; - proto.aggregator.TaskNode.prototype.hasLoop = function() { - return jspb.Message.getField(this, 17) != null; - }; - proto.aggregator.TaskNode.prototype.getCustomCode = function() { - return ( - /** @type{?proto.aggregator.CustomCodeNode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) - ); - }; - proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { - return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); - }; - proto.aggregator.TaskNode.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); - }; - proto.aggregator.TaskNode.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 18) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); - }; - proto.aggregator.Execution.toObject = function(includeInstance, msg) { - var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Execution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution(); - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setEpoch(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUserOpHash(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Execution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.Execution.prototype.getEpoch = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Execution.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Execution.prototype.getUserOpHash = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Execution.prototype.setUserOpHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Execution.prototype.getError = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Execution.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Task.toObject(opt_includeInstance, this); - }; - proto.aggregator.Task.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), - memo: jspb.Message.getFieldWithDefault(msg, 6, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), - status: jspb.Message.getFieldWithDefault(msg, 9, 0), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskNode.toObject, - includeInstance - ), - edgesList: jspb.Message.toObjectList( - msg.getEdgesList(), - proto.aggregator.TaskEdge.toObject, - includeInstance - ), - executionsList: jspb.Message.toObjectList( - msg.getExecutionsList(), - proto.aggregator.Execution.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Task.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Task(); - return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartWalletAddress(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 5: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 6: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 7: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setCompletedAt(value); - break; - case 8: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMaxExecution(value); - break; - case 9: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - case 10: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - case 11: - var value = new proto.aggregator.TaskNode(); - reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 12: - var value = new proto.aggregator.TaskEdge(); - reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); - msg.addEdges(value); - break; - case 13: - var value = new proto.aggregator.Execution(); - reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); - msg.addExecutions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Task.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSmartWalletAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getCompletedAt(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getMaxExecution(); - if (f !== 0) { - writer.writeInt64( - 8, - f - ); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum( - 9, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 11, - f, - proto.aggregator.TaskNode.serializeBinaryToWriter - ); - } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - proto.aggregator.TaskEdge.serializeBinaryToWriter - ); - } - f = message.getExecutionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 13, - f, - proto.aggregator.Execution.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Task.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Task.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Task.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Task.prototype.getSmartWalletAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.Task.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 5, 0) - ); - }; - proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); - }; - proto.aggregator.Task.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 6, "") - ); - }; - proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); - }; - proto.aggregator.Task.prototype.getCompletedAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) - ); - }; - proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); - }; - proto.aggregator.Task.prototype.getMaxExecution = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 8, 0) - ); - }; - proto.aggregator.Task.prototype.setMaxExecution = function(value) { - return jspb.Message.setProto3IntField(this, 8, value); - }; - proto.aggregator.Task.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 9, 0) - ); - }; - proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); - }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 10, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 10) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 11, value); - }; - proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); - }; - proto.aggregator.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; - proto.aggregator.Task.prototype.getEdgesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) - ); - }; - proto.aggregator.Task.prototype.setEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); - }; - proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); - }; - proto.aggregator.Task.prototype.clearEdgesList = function() { - return this.setEdgesList([]); - }; - proto.aggregator.Task.prototype.getExecutionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) - ); - }; - proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 13, value); - }; - proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); - }; - proto.aggregator.Task.prototype.clearExecutionsList = function() { - return this.setExecutionsList([]); - }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { - var f, obj = { - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), - smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - memo: jspb.Message.getFieldWithDefault(msg, 6, ""), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskNode.toObject, - includeInstance - ), - edgesList: jspb.Message.toObjectList( - msg.getEdgesList(), - proto.aggregator.TaskEdge.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 3: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMaxExecution(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartWalletAddress(value); - break; - case 6: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 7: - var value = new proto.aggregator.TaskNode(); - reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 8: - var value = new proto.aggregator.TaskEdge(); - reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); - msg.addEdges(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 3, - f - ); - } - f = message.getMaxExecution(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getSmartWalletAddress(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 7, - f, - proto.aggregator.TaskNode.serializeBinaryToWriter - ); - } - f = message.getEdgesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 8, - f, - proto.aggregator.TaskEdge.serializeBinaryToWriter - ); - } - }; - proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 3, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); - }; - proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 6, "") - ); - }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); - }; - proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 7, value); - }; - proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); - }; - proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; - proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 8, value); - }; - proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); - }; - proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { - return this.setEdgesList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.CreateTaskResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateTaskResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceRequest(); - return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.NonceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceRequest.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { - var f, obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.NonceResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceResp(); - return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.NonceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceResp.prototype.getNonce = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { - var f, obj = { - factory: jspb.Message.getFieldWithDefault(msg, 1, ""), - salt: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListWalletReq(); - return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactory(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getFactory(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ListWalletReq.prototype.getFactory = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListWalletReq.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); - }; - proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - salt: jspb.Message.getFieldWithDefault(msg, 2, ""), - factory: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SmartWallet(); - return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactory(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SmartWallet.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFactory(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.SmartWallet.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SmartWallet.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SmartWallet.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SmartWallet.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SmartWallet.prototype.getFactory = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.SmartWallet.prototype.setFactory = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.ListWalletResp.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { - var f, obj = { - walletsList: jspb.Message.toObjectList( - msg.getWalletsList(), - proto.aggregator.SmartWallet.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListWalletResp(); - return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.SmartWallet(); - reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); - msg.addWallets(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getWalletsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.SmartWallet.serializeBinaryToWriter - ); - } - }; - proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) - ); - }; - proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); - }; - proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { - return this.setWalletsList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = { - smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartWalletAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getSmartWalletAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - tasksList: jspb.Message.toObjectList( - msg.getTasksList(), - proto.aggregator.Task.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.Task(); - reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); - msg.addTasks(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTasksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.Task.serializeBinaryToWriter - ); - } - }; - proto.aggregator.ListTasksResp.prototype.getTasksList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) - ); - }; - proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); - }; - proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { - return this.setTasksList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GetKeyReq(); - return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setOwner(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.GetKeyReq.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.GetKeyReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.KeyResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.KeyResp(); - return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.KeyResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.KeyResp.prototype.getKey = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.KeyResp.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } - }; - proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 3) - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); - }; - proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); - }; - proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { - var f, obj = { - salt: jspb.Message.getFieldWithDefault(msg, 1, ""), - factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateWalletReq(); - return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactoryAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFactoryAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.CreateWalletReq.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { - var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - salt: jspb.Message.getFieldWithDefault(msg, 2, ""), - factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateWalletResp(); - return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSalt(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setFactoryAddress(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSalt(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getFactoryAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.CreateWalletResp.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.CreateWalletResp.prototype.getSalt = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Error = { - UNKNOWERROR: 0, - RPCNODEERROR: 1e3, - STORAGEUNAVAILABLE: 2e3, - STORAGEWRITEERROR: 2001, - SMARTWALLETRPCERROR: 6e3, - SMARTWALLETNOTFOUNDERROR: 6001, - TASKDATACORRUPTED: 7e3, - TASKDATAMISSINGERROR: 7001 - }; - proto.aggregator.TaskStatus = { - ACTIVE: 0, - COMPLETED: 1, - FAILED: 2, - CANCELED: 3, - EXECUTING: 4 - }; - proto.aggregator.CustomCodeType = { - JAVASCRIPT: 0 - }; - goog.object.extend(exports, proto.aggregator); - } -}); - -// grpc_codegen/avs_grpc_pb.js -var require_avs_grpc_pb = __commonJS({ - "grpc_codegen/avs_grpc_pb.js"(exports) { - "use strict"; - var grpc2 = __require("@grpc/grpc-js"); - var avs_pb3 = require_avs_pb(); - var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); - var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); - function serialize_aggregator_Checkin(arg) { - if (!(arg instanceof avs_pb3.Checkin)) { - throw new Error("Expected argument of type aggregator.Checkin"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb3.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb3.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb3.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateWalletReq(arg) { - if (!(arg instanceof avs_pb3.CreateWalletReq)) { - throw new Error("Expected argument of type aggregator.CreateWalletReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateWalletReq(buffer_arg) { - return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_CreateWalletResp(arg) { - if (!(arg instanceof avs_pb3.CreateWalletResp)) { - throw new Error("Expected argument of type aggregator.CreateWalletResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_CreateWalletResp(buffer_arg) { - return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_GetKeyReq(arg) { - if (!(arg instanceof avs_pb3.GetKeyReq)) { - throw new Error("Expected argument of type aggregator.GetKeyReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_IdReq(arg) { - if (!(arg instanceof avs_pb3.IdReq)) { - throw new Error("Expected argument of type aggregator.IdReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_IdReq(buffer_arg) { - return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_KeyResp(arg) { - if (!(arg instanceof avs_pb3.KeyResp)) { - throw new Error("Expected argument of type aggregator.KeyResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb3.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb3.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListWalletReq(arg) { - if (!(arg instanceof avs_pb3.ListWalletReq)) { - throw new Error("Expected argument of type aggregator.ListWalletReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListWalletReq(buffer_arg) { - return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_ListWalletResp(arg) { - if (!(arg instanceof avs_pb3.ListWalletResp)) { - throw new Error("Expected argument of type aggregator.ListWalletResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_ListWalletResp(buffer_arg) { - return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_NonceRequest(arg) { - if (!(arg instanceof avs_pb3.NonceRequest)) { - throw new Error("Expected argument of type aggregator.NonceRequest"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb3.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb3.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb3.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb3.Task)) { - throw new Error("Expected argument of type aggregator.Task"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_Task(buffer_arg) { - return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb3.UpdateChecksReq)) { - throw new Error("Expected argument of type aggregator.UpdateChecksReq"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb3.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); - } - function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); - } - return Buffer.from(arg.serializeBinary()); - } - function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); - } - var AggregatorService = exports.AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb3.GetKeyReq, - responseType: avs_pb3.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb3.NonceRequest, - responseType: avs_pb3.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - createWallet: { - path: "/aggregator.Aggregator/CreateWallet", - requestStream: false, - responseStream: false, - requestType: avs_pb3.CreateWalletReq, - responseType: avs_pb3.CreateWalletResp, - requestSerialize: serialize_aggregator_CreateWalletReq, - requestDeserialize: deserialize_aggregator_CreateWalletReq, - responseSerialize: serialize_aggregator_CreateWalletResp, - responseDeserialize: deserialize_aggregator_CreateWalletResp - }, - listWallets: { - path: "/aggregator.Aggregator/ListWallets", - requestStream: false, - responseStream: false, - requestType: avs_pb3.ListWalletReq, - responseType: avs_pb3.ListWalletResp, - requestSerialize: serialize_aggregator_ListWalletReq, - requestDeserialize: deserialize_aggregator_ListWalletReq, - responseSerialize: serialize_aggregator_ListWalletResp, - responseDeserialize: deserialize_aggregator_ListWalletResp - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.CreateTaskReq, - responseType: avs_pb3.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb3.ListTasksReq, - responseType: avs_pb3.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.IdReq, - responseType: avs_pb3.Task, - requestSerialize: serialize_aggregator_IdReq, - requestDeserialize: deserialize_aggregator_IdReq, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.IdReq, - responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_IdReq, - requestDeserialize: deserialize_aggregator_IdReq, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb3.IdReq, - responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_IdReq, - requestDeserialize: deserialize_aggregator_IdReq, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb3.Checkin, - responseType: avs_pb3.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb3.SyncTasksReq, - responseType: avs_pb3.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb3.UpdateChecksReq, - responseType: avs_pb3.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp - } - }; - exports.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); - } -}); - -// src/index.ts -import _ from "lodash"; -import * as grpc from "@grpc/grpc-js"; -import { Metadata } from "@grpc/grpc-js"; - -// src/auth.ts -var getKeyRequestMessage = (address, expiredAt) => { - return `key request for ${address} expired at ${expiredAt}`; -}; - -// src/index.ts -var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); -var avs_pb2 = __toESM(require_avs_pb()); - -// src/builder.ts -var avs_pb = __toESM(require_avs_pb()); -var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { - const n = new avs_pb.ContractWriteNode(); - n.setContractAddress(contractAddress2); - n.setCallData(callData); - if (contractABI) { - n.setContractAbi(contractABI); - } - return n; -}; -var buildContractRead = ({ contract_ddress, callData, contractABI }) => { - const n = new avs_pb.ContractReadNode(); - n.setContractAddress(contractAddress); - n.setCallData(callData); - if (n.contractABI) { - n.setContractAbi(n.contractABI); - } - return n; -}; -var buildGraphQL = ({ url, query, variables }) => { - const n = new avs_pb.GraphQLQueryNode(); - n.setUrl(url); - n.setQuery(query); - for (const [k, v] of Object.entries(variables || {})) { - n.getVariablesMap().set(k, v); - } - return n; -}; -var buildRestAPI = ({ url, body, method, headers }) => { - const n = new avs_pb.RestAPINode(); - n.setUrl(url); - n.setBody(body); - n.setMethod(method); - for (const [k, v] of Object.entries(headers || {})) { - n.getHeadersMap().set(k, v); - } - return n; -}; -var buildBranch = ({ conditions }) => { - const n = new avs_pb.BranchNode(); - for (const item of conditions) { - const condition = new avs_pb.Condition(); - condition.setId(item.id); - condition.setType(item.type); - condition.setExpression(item.expression); - n.addConditions(condition); - } - return n; -}; -var buildFilter = ({ expression }) => { - const n = new avs_pb.FilterNode(); - n.setExpression(expression); - return n; -}; -var buildTaskEdge = ({ id, source, target }) => { - const edge = new avs_pb.TaskEdge(); - edge.setId(id); - edge.setSource(source); - edge.setTarget(target); - return edge; -}; -var buildTaskNode = (node) => { - const n = new avs_pb.TaskNode(); - n.setId(node.id); - n.setName(node.name); - if (node.ethTransfer) { - const ethTransfer = new avs_pb.ETHTransferNode(); - ethTransfer.setDestination(node.ethTransfer.destination); - ethTransfer.setAmount(node.ethTransfer.amount); - n.setEthTransfer(ethTransfer); - } else if (node.contractWrite) { - n.setContractWrite(buildContractWrite(node.contractWrite)); - } else if (node.contractRead) { - n.setContractRead(buildContractRead(node.contractRead)); - } else if (node.graphqlDataQuery) { - n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); - } else if (node.restApi) { - n.setRestApi(buildRestAPI(node.restApi)); - } else if (node.branch) { - n.setBranch(buildBranch(node.branch)); - } else if (node["filter"]) { - n.setfilter(buildFilter(node["filter"])); - } else if (node.customCode) { - const code = new avs_pb.CustomCodeNode(); - code.setType(node.customCode.type); - n.setCustomCode(node.customCode); - } else { - throw new Error("missing task payload"); - } - return n; -}; -var buildTrigger = (payload) => { - const trigger = new avs_pb.TaskTrigger(); - for (const [key, value] of Object.entries(payload)) { - if (key == "manual") { - trigger.setManual(value); - return trigger; - } - if (key == "fixedTime") { - let schedule = new avs_pb.FixedEpochCondition(); - schedule.setEpochsList(value.epochs); - trigger.setFixedTime(schedule); - return trigger; - } - if (key == "cron") { - const cron = new avs_pb.CronCondition(); - cron.setScheduleList(value.schedule); - trigger.setCron(cron); - return trigger; - } - if (key == "block") { - const block = new avs_pb.BlockCondition(); - block.setInterval(value.interval); - trigger.setBlock(block); - return trigger; - } - if (key == "event") { - const event = new avs_pb.EventCondition(); - event.setExpression(payload.event.expression); - trigger.setEvent(event); - return trigger; - } - throw new Error("missing trigger"); - } -}; -var triggerFromGRPC = (trigger) => { - if (!trigger) { - return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; - } - const base = { - triggerType: trigger.getTriggerTypeCase() - }; - switch (trigger.getTriggerTypeCase()) { - case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: - base.manual = trigger.getManual(); - break; - case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: - base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; - break; - case avs_pb.TaskTrigger.TriggerTypeCase.CRON: - base.cron = { schedule: trigger.getCron().getScheduleList() }; - break; - case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: - base.block = { interval: trigger.getBlock().getInterval() }; - break; - case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: - base.event = { expression: trigger.getEvent().getExpression() }; - break; - } - return base; -}; -var nodeFromGRPC = (node) => { - const base = node.toObject(); - const standarize = { - taskType: node.getTaskTypeCase() - }; - switch (node.getTaskTypeCase()) { - case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: - standarize.ethTransfer = base.ethTransfer; - break; - case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: - standarize.contractWrite = base.contractWrite; - break; - case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: - standarize.contractRead = base.contractRead; - break; - case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: - standarize.graphqlDataQuery = base.graphqlDataQuery; - break; - case avs_pb.TaskNode.TaskTypeCase.REST_API: - standarize.restApi = base.restApi; - break; - case avs_pb.TaskNode.TaskTypeCase.BRANCH: - standarize.branch = { - conditions: base.branch.conditionsList - }; - break; - case avs_pb.TaskNode.TaskTypeCase.FILTER: - standarize.filter = base.filter; - break; - case avs_pb.TaskNode.TaskTypeCase.LOOP: - standarize.loop = base.loop; - break; - case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: - standarize.custom_code = base.custom_code; - break; - } - return standarize; -}; -var taskEdgeFromGRPC = (edge) => { - return { - id: edge.getId(), - source: edge.getSource(), - target: edge.getTarget() - }; -}; - -// src/task.ts -var Task = class { - constructor(task) { - this.id = task.getId() || ""; - this.status = task.getStatus(); - this.owner = task.getOwner(); - this.smartWalletAddress = task.getSmartWalletAddress(); - this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); - this.trigger = triggerFromGRPC(task.getTrigger()); - this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); - this.startAt = task.getStartAt(); - this.expiredAt = task.getExpiredAt(); - this.memo = task.getMemo(); - this.completedAt = task.getCompletedAt(); - this.status = task.getStatus(); - this.executions = task.getExecutionsList().map((execution) => { - return { - epoch: execution.getEpoch(), - userOpHash: execution.getUserOpHash(), - error: execution.getError() - }; - }); - this.maxExecution = task.getMaxExecution(); - } -}; -var task_default = Task; - -// src/types.ts -var AUTH_KEY_HEADER = "authkey"; - -// src/index.ts -var BaseClient = class { - constructor(opts) { - this.endpoint = opts.endpoint; - this.rpcClient = new import_avs_grpc_pb.AggregatorClient( - this.endpoint, - grpc.credentials.createInsecure() - ); - this.metadata = new Metadata(); - } - isAuthKeyValid(key) { - try { - const [, payload] = key.split("."); - const decodedPayload = JSON.parse(atob(payload)); - const currentTimestamp = Math.floor(Date.now() / 1e3); - return decodedPayload.exp > currentTimestamp; - } catch (error) { - console.error("Error validating auth key:", error); - return false; - } - } - // When using the APIkey, depends on scope of the key, it may have access to one ore more account - async authWithAPIKey(address, apiKey, expiredAtEpoch) { - const request = new avs_pb2.GetKeyReq(); - request.setOwner(address); - request.setExpiredAt(expiredAtEpoch); - request.setSignature(apiKey); - const result = await this._callAnonRPC("getKey", request); - return { authKey: result.getKey() }; - } - // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address, signature, expiredAtEpoch) { - const request = new avs_pb2.GetKeyReq(); - request.setOwner(address); - request.setExpiredAt(expiredAtEpoch); - request.setSignature(signature); - let result = await this._callAnonRPC( - "getKey", - request - ); - return { authKey: result.getKey() }; - } - _callRPC(method, request, options) { - const metadata = _.cloneDeep(this.metadata); - if (!options?.authKey) { - throw new Error("missing auth header"); - } - metadata.set(AUTH_KEY_HEADER, options.authKey); - return new Promise((resolve, reject) => { - this.rpcClient[method].bind(this.rpcClient)( - request, - metadata, - (error, response) => { - if (error) reject(error); - else resolve(response); - } - ); - }); - } - _callAnonRPC(method, request, options) { - const metadata = _.cloneDeep(this.metadata); - return new Promise((resolve, reject) => { - this.rpcClient[method].bind(this.rpcClient)( - request, - metadata, - (error, response) => { - if (error) reject(error); - else resolve(response); - } - ); - }); - } -}; -var Client = class extends BaseClient { - constructor(config) { - super(config); - } - async listSmartWallets(options) { - const request = new avs_pb2.ListWalletReq(); - const result = await this._callRPC("listWallets", request, options); - return result.getWalletsList().map((item) => item.toObject()); - } - async createWallet({ - salt, - factoryAddress - }, options) { - const request = new avs_pb2.CreateWalletReq(); - request.setSalt(salt); - if (factoryAddress) { - request.setFactoryAddress(factoryAddress); - } - const result = await this._callRPC("createWallet", request, options); - return { - address: result.getAddress(), - salt: result.getSalt(), - factory: result.getFactoryAddress() - }; - } - async createTask(payload, options) { - const request = new avs_pb2.CreateTaskReq(); - request.setSmartWalletAddress(payload.smartWalletAddress); - request.setStartAt(payload.startAt); - request.setExpiredAt(payload.expiredAt || -1); - request.setMemo(payload.memo || ""); - request.setMaxExecution(payload.maxExecution || 0); - request.setTrigger(buildTrigger(payload.trigger)); - for (const node of payload.nodes) { - request.addNodes(buildTaskNode(node)); - } - const edges = []; - for (const edge of payload.edges) { - edges.push(buildTaskEdge(edge)); - } - request.setEdgesList(edges); - const result = await this._callRPC("createTask", request, options); - return result.getId(); - } - async listTasks(address, options) { - const request = new avs_pb2.ListTasksReq(); - request.setSmartWalletAddress(address); - const result = await this._callRPC("listTasks", request, options); - return result.getTasksList().map((item) => new task_default(item)); - } - // TODO: specify the return type to match client’s requirements - async getTask(id, options) { - const request = new avs_pb2.IdReq(); - request.setId(id); - const result = await this._callRPC( - "getTask", - request, - options - ); - return new task_default(result); - } - async cancelTask(id, options) { - const request = new avs_pb2.IdReq(); - request.setId(id); - const result = await this._callRPC( - "cancelTask", - request, - options - ); - return result.getValue(); - } - async deleteTask(id, options) { - const request = new avs_pb2.IdReq(); - request.setId(id); - const result = await this._callRPC( - "deleteTask", - request, - options - ); - return result.getValue(); - } -}; -export { - AUTH_KEY_HEADER, - Client as default, - getKeyRequestMessage -}; From ebbc05aff30c2723c51d218895bbc3af2784dda5 Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Wed, 20 Nov 2024 19:03:00 -0800 Subject: [PATCH 48/51] Added grpc-tools to package.json dependency --- package-lock.json | 434 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 2 files changed, 436 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index a659814..59b08c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@types/lodash": "^4.17.12", "babel-jest": "^29.7.0", "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4", "jest": "^29.7.0", "ts-jest": "^29.2.5", "tsup": "^8.0.2", @@ -3171,6 +3172,62 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@noble/curves": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", @@ -3705,12 +3762,30 @@ "dev": true, "license": "MIT" }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/aes-js": { "version": "4.0.0-beta.5", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", "license": "MIT" }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -3782,6 +3857,26 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -4213,6 +4308,15 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -4286,6 +4390,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -4313,6 +4426,12 @@ "node": "^14.18.0 || >=16.10.0" } }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -4414,6 +4533,12 @@ "node": ">=0.10.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -4424,6 +4549,15 @@ "node": ">=8" } }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -4873,6 +5007,36 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4905,6 +5069,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -5047,6 +5232,20 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/grpc-tools": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5" + }, + "bin": { + "grpc_tools_node_protoc": "bin/protoc.js", + "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" + } + }, "node_modules/handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -5089,6 +5288,12 @@ "node": ">=8" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -5109,6 +5314,19 @@ "dev": true, "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/human-id": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", @@ -6371,6 +6589,49 @@ "node": ">=8" } }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -6414,6 +6675,26 @@ "dev": true, "license": "MIT" }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -6428,6 +6709,21 @@ "dev": true, "license": "MIT" }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6451,6 +6747,19 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -6944,6 +7253,20 @@ "node": ">=4" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -7103,6 +7426,22 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rollup": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", @@ -7163,6 +7502,26 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7180,6 +7539,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7387,6 +7752,15 @@ "node": ">=10" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7596,6 +7970,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -7722,6 +8119,12 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -8001,6 +8404,12 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -8026,6 +8435,22 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -8042,6 +8467,15 @@ "node": ">= 8" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index 595fe74..60b0218 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "node": ">=20.18.0" }, "scripts": { - "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/new-task-data-structure/protobuf/avs.proto > grpc_codegen/avs.proto", + "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/main/protobuf/avs.proto > grpc_codegen/avs.proto", "gen-protoc": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc_codegen/ --grpc_out=grpc_js:./grpc_codegen/ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./grpc_codegen --proto_path=./grpc_codegen grpc_codegen/avs.proto", "build": "tsup src/index.ts --format cjs,esm --dts", "gen-apikey": "sh -c 'API_KEY=$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey) && echo \"Generated API key for tests: $API_KEY\" && echo \"Writing to .env.test to replace the TEST_API_KEY env variable\" && sed -i \"\" -e \"s/^TEST_API_KEY=.*/TEST_API_KEY=$API_KEY/\" .env.test && echo \"Done.\"'", @@ -51,6 +51,7 @@ "@types/lodash": "^4.17.12", "babel-jest": "^29.7.0", "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4", "jest": "^29.7.0", "ts-jest": "^29.2.5", "tsup": "^8.0.2", From 05aa834f61e00464608702c4c1bf9109c49cef78 Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Wed, 20 Nov 2024 19:04:03 -0800 Subject: [PATCH 49/51] Remove the ./dist folder --- dist/index.d.mts | 1377 +++++++++ dist/index.d.ts | 1377 +++++++++ dist/index.js | 5735 ++++++++++++++++++++++++++++++++++++ dist/index.mjs | 5728 +++++++++++++++++++++++++++++++++++ grpc_codegen/compiled.d.ts | 5536 ---------------------------------- 5 files changed, 14217 insertions(+), 5536 deletions(-) create mode 100644 dist/index.d.mts create mode 100644 dist/index.d.ts create mode 100644 dist/index.js create mode 100644 dist/index.mjs delete mode 100644 grpc_codegen/compiled.d.ts diff --git a/dist/index.d.mts b/dist/index.d.mts new file mode 100644 index 0000000..b7d14e6 --- /dev/null +++ b/dist/index.d.mts @@ -0,0 +1,1377 @@ +import * as grpc from '@grpc/grpc-js'; +import { Metadata } from '@grpc/grpc-js'; +import * as jspb from 'google-protobuf'; +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; +import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; + +declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; + +// package: aggregator +// file: avs.proto + + + +declare class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; +} + +declare namespace IdReq { + export type AsObject = { + id: string, + } +} + +declare class Checkin extends jspb.Message { + getId(): string; + setId(value: string): Checkin; + getAddress(): string; + setAddress(value: string): Checkin; + getSignature(): string; + setSignature(value: string): Checkin; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): Checkin.Status | undefined; + setStatus(value?: Checkin.Status): Checkin; + getVersion(): string; + setVersion(value: string): Checkin; + getMetricsport(): number; + setMetricsport(value: number): Checkin; + getRemoteip(): string; + setRemoteip(value: string): Checkin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Checkin.AsObject; + static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Checkin; + static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; +} + +declare namespace Checkin { + export type AsObject = { + id: string, + address: string, + signature: string, + status?: Checkin.Status.AsObject, + version: string, + metricsport: number, + remoteip: string, + } + + + export class Status extends jspb.Message { + getUptime(): number; + setUptime(value: number): Status; + getQueuedepth(): number; + setQueuedepth(value: number): Status; + + hasLastHeartbeat(): boolean; + clearLastHeartbeat(): void; + getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; + } + + export namespace Status { + export type AsObject = { + uptime: number, + queuedepth: number, + lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + } + +} + +declare class CheckinResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckinResp.AsObject; + static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckinResp; + static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; +} + +declare namespace CheckinResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class SyncTasksReq extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksReq; + getAddress(): string; + setAddress(value: string): SyncTasksReq; + getSignature(): string; + setSignature(value: string): SyncTasksReq; + getMonotonicClock(): number; + setMonotonicClock(value: number): SyncTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksReq; + static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; +} + +declare namespace SyncTasksReq { + export type AsObject = { + id: string, + address: string, + signature: string, + monotonicClock: number, + } +} + +declare class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} + +declare namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} + +declare class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; +} + +declare namespace CronCondition { + export type AsObject = { + scheduleList: Array, + } +} + +declare class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; +} + +declare namespace BlockCondition { + export type AsObject = { + interval: number, + } +} + +declare class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; +} + +declare namespace EventCondition { + export type AsObject = { + expression: string, + } +} + +declare class TaskTrigger$1 extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger$1; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger$1; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger$1; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger$1; + + getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; + static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; +} + +declare namespace TaskTrigger$1 { + export type AsObject = { + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, + } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + +} + +declare class SyncTasksResp extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksResp; + getChecktype(): string; + setChecktype(value: string): SyncTasksResp; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): SyncTasksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksResp; + static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; +} + +declare namespace SyncTasksResp { + export type AsObject = { + id: string, + checktype: string, + trigger?: TaskTrigger$1.AsObject, + } +} + +declare class ETHTransferNode extends jspb.Message { + getDestination(): string; + setDestination(value: string): ETHTransferNode; + getAmount(): string; + setAmount(value: string): ETHTransferNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; +} + +declare namespace ETHTransferNode { + export type AsObject = { + destination: string, + amount: string, + } +} + +declare class ContractWriteNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractWriteNode; + getCallData(): string; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; +} + +declare namespace ContractWriteNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +declare namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class GraphQLQueryNode extends jspb.Message { + getUrl(): string; + setUrl(value: string): GraphQLQueryNode; + getQuery(): string; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; +} + +declare namespace GraphQLQueryNode { + export type AsObject = { + url: string, + query: string, + + variablesMap: Array<[string, string]>, + } +} + +declare class RestAPINode extends jspb.Message { + getUrl(): string; + setUrl(value: string): RestAPINode; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + getBody(): string; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; +} + +declare namespace RestAPINode { + export type AsObject = { + url: string, + + headersMap: Array<[string, string]>, + body: string, + method: string, + } +} + +declare class CustomCodeNode extends jspb.Message { + getType(): CustomCodeType; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; +} + +declare namespace CustomCodeNode { + export type AsObject = { + type: CustomCodeType, + source: string, + } +} + +declare class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; + getExpression(): string; + setExpression(value: string): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; +} + +declare namespace Condition { + export type AsObject = { + id: string, + type: string, + expression: string, + } +} + +declare class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +declare namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} + +declare class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; +} + +declare namespace FilterNode { + export type AsObject = { + expression: string, + } +} + +declare class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +declare namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + +declare class TaskEdge$1 extends jspb.Message { + getId(): string; + setId(value: string): TaskEdge$1; + getSource(): string; + setSource(value: string): TaskEdge$1; + getTarget(): string; + setTarget(value: string): TaskEdge$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge$1; + static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; +} + +declare namespace TaskEdge$1 { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +declare class TaskNode$1 extends jspb.Message { + getId(): string; + setId(value: string): TaskNode$1; + getName(): string; + setName(value: string): TaskNode$1; + + hasEthTransfer(): boolean; + clearEthTransfer(): void; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode$1; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode$1; + + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode$1; + + hasGraphqlDataQuery(): boolean; + clearGraphqlDataQuery(): void; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode$1; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode$1; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode$1; + + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode$1; + + hasCustomCode(): boolean; + clearCustomCode(): void; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode$1; + + getTaskTypeCase(): TaskNode$1.TaskTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskNode$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode$1; + static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; +} + +declare namespace TaskNode$1 { + export type AsObject = { + id: string, + name: string, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, + } + + export enum TaskTypeCase { + TASK_TYPE_NOT_SET = 0, + ETH_TRANSFER = 10, + CONTRACT_WRITE = 11, + CONTRACT_READ = 12, + GRAPHQL_DATA_QUERY = 13, + REST_API = 14, + BRANCH = 15, + FILTER = 16, + LOOP = 17, + CUSTOM_CODE = 18, + } + +} + +declare class Execution$1 extends jspb.Message { + getEpoch(): number; + setEpoch(value: number): Execution$1; + getUserOpHash(): string; + setUserOpHash(value: string): Execution$1; + getError(): string; + setError(value: string): Execution$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Execution$1.AsObject; + static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution$1; + static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; +} + +declare namespace Execution$1 { + export type AsObject = { + epoch: number, + userOpHash: string, + error: string, + } +} + +declare class Task$1 extends jspb.Message { + getId(): string; + setId(value: string): Task$1; + getOwner(): string; + setOwner(value: string): Task$1; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task$1; + getStartAt(): number; + setStartAt(value: number): Task$1; + getExpiredAt(): number; + setExpiredAt(value: number): Task$1; + getMemo(): string; + setMemo(value: string): Task$1; + getCompletedAt(): number; + setCompletedAt(value: number): Task$1; + getMaxExecution(): number; + setMaxExecution(value: number): Task$1; + getStatus(): TaskStatus; + setStatus(value: TaskStatus): Task$1; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): Task$1; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; + clearExecutionsList(): void; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution$1, index?: number): Execution$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Task$1.AsObject; + static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Task$1; + static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; +} + +declare namespace Task$1 { + export type AsObject = { + id: string, + owner: string, + smartWalletAddress: string, + startAt: number, + expiredAt: number, + memo: string, + completedAt: number, + maxExecution: number, + status: TaskStatus, + trigger?: TaskTrigger$1.AsObject, + nodesList: Array, + edgesList: Array, + executionsList: Array, + } +} + +declare class CreateTaskReq extends jspb.Message { + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): CreateTaskReq; + getStartAt(): number; + setStartAt(value: number): CreateTaskReq; + getExpiredAt(): number; + setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; + getMemo(): string; + setMemo(value: string): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskReq.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskReq; + static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; +} + +declare namespace CreateTaskReq { + export type AsObject = { + trigger?: TaskTrigger$1.AsObject, + startAt: number, + expiredAt: number, + maxExecution: number, + smartWalletAddress: string, + memo: string, + nodesList: Array, + edgesList: Array, + } +} + +declare class CreateTaskResp extends jspb.Message { + getId(): string; + setId(value: string): CreateTaskResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskResp; + static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; +} + +declare namespace CreateTaskResp { + export type AsObject = { + id: string, + } +} + +declare class NonceRequest extends jspb.Message { + getOwner(): string; + setOwner(value: string): NonceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceRequest.AsObject; + static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceRequest; + static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; +} + +declare namespace NonceRequest { + export type AsObject = { + owner: string, + } +} + +declare class NonceResp extends jspb.Message { + getNonce(): string; + setNonce(value: string): NonceResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceResp.AsObject; + static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceResp; + static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; +} + +declare namespace NonceResp { + export type AsObject = { + nonce: string, + } +} + +declare class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; +} + +declare namespace ListWalletReq { + export type AsObject = { + factory: string, + salt: string, + } +} + +declare class SmartWallet$1 extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet$1; + getSalt(): string; + setSalt(value: string): SmartWallet$1; + getFactory(): string; + setFactory(value: string): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SmartWallet$1.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet$1; + static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; +} + +declare namespace SmartWallet$1 { + export type AsObject = { + address: string, + salt: string, + factory: string, + } +} + +declare class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +declare namespace ListWalletResp { + export type AsObject = { + walletsList: Array, + } +} + +declare class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksReq; + static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; +} + +declare namespace ListTasksReq { + export type AsObject = { + smartWalletAddress: string, + } +} + +declare class ListTasksResp extends jspb.Message { + clearTasksList(): void; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task$1, index?: number): Task$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksResp; + static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; +} + +declare namespace ListTasksResp { + export type AsObject = { + tasksList: Array, + } +} + +declare class GetKeyReq extends jspb.Message { + getOwner(): string; + setOwner(value: string): GetKeyReq; + getExpiredAt(): number; + setExpiredAt(value: number): GetKeyReq; + getSignature(): string; + setSignature(value: string): GetKeyReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetKeyReq.AsObject; + static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetKeyReq; + static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; +} + +declare namespace GetKeyReq { + export type AsObject = { + owner: string, + expiredAt: number, + signature: string, + } +} + +declare class KeyResp extends jspb.Message { + getKey(): string; + setKey(value: string): KeyResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyResp.AsObject; + static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyResp; + static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; +} + +declare namespace KeyResp { + export type AsObject = { + key: string, + } +} + +declare class UpdateChecksReq extends jspb.Message { + getAddress(): string; + setAddress(value: string): UpdateChecksReq; + getSignature(): string; + setSignature(value: string): UpdateChecksReq; + clearIdList(): void; + getIdList(): Array; + setIdList(value: Array): UpdateChecksReq; + addId(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; + static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; +} + +declare namespace UpdateChecksReq { + export type AsObject = { + address: string, + signature: string, + idList: Array, + } +} + +declare class UpdateChecksResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; + static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; +} + +declare namespace UpdateChecksResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class CreateWalletReq$1 extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq$1; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; + static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; +} + +declare namespace CreateWalletReq$1 { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +declare class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; +} + +declare namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } +} + +declare enum TaskStatus { + ACTIVE = 0, + COMPLETED = 1, + FAILED = 2, + CANCELED = 3, + EXECUTING = 4, +} + +declare enum CustomCodeType { + JAVASCRIPT = 0, +} + +// package: aggregator +// file: avs.proto + + + +interface IAggregatorClient { + getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +declare class AggregatorClient extends grpc.Client implements IAggregatorClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +type Environment = "production" | "development" | "staging"; +declare const AUTH_KEY_HEADER = "authkey"; +interface RequestOptions { + authKey: string; +} +interface GetKeyResponse { + authKey: string; +} +interface ClientOption { + endpoint: string; +} +interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[]; + }; + block?: { + interval: number; + }; +} +interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} +interface TaskType { + id: string; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + status: number; + maxExecution: number; + executions: Execution[]; +} +interface CreateTaskResponse { + id: string; +} +interface ListTasksResponse { + tasks: { + id: string; + status: string; + }[]; +} +interface CancelTaskResponse { + value: boolean; +} +interface DeleteTaskResponse { + value: boolean; +} +interface SmartWallet { + address: string; + salt: string; + factory: string; +} +interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} +interface Execution { + epoch: number; + userOpHash: string; + error: string; +} +interface TaskEdge { + id: string; + source: string; + target: string; +} + +declare class Task implements TaskType { + id: string; + status: number; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + maxExecution: number; + executions: Execution[]; + constructor(task: Task$1); +} + +declare class BaseClient { + readonly endpoint: string; + readonly rpcClient: AggregatorClient; + protected metadata: Metadata; + constructor(opts: ClientOption); + isAuthKeyValid(key: string): boolean; + authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; + authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; + protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; + protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; +} +declare class Client extends BaseClient { + constructor(config: ClientOption); + listSmartWallets(options: RequestOptions): Promise; + createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; + createTask(payload: any, options: RequestOptions): Promise; + listTasks(address: string, options: RequestOptions): Promise; + getTask(id: string, options: RequestOptions): Promise; + cancelTask(id: string, options: RequestOptions): Promise; + deleteTask(id: string, options: RequestOptions): Promise; +} + +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..b7d14e6 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,1377 @@ +import * as grpc from '@grpc/grpc-js'; +import { Metadata } from '@grpc/grpc-js'; +import * as jspb from 'google-protobuf'; +import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; +import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; + +declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; + +// package: aggregator +// file: avs.proto + + + +declare class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; +} + +declare namespace IdReq { + export type AsObject = { + id: string, + } +} + +declare class Checkin extends jspb.Message { + getId(): string; + setId(value: string): Checkin; + getAddress(): string; + setAddress(value: string): Checkin; + getSignature(): string; + setSignature(value: string): Checkin; + + hasStatus(): boolean; + clearStatus(): void; + getStatus(): Checkin.Status | undefined; + setStatus(value?: Checkin.Status): Checkin; + getVersion(): string; + setVersion(value: string): Checkin; + getMetricsport(): number; + setMetricsport(value: number): Checkin; + getRemoteip(): string; + setRemoteip(value: string): Checkin; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Checkin.AsObject; + static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Checkin; + static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; +} + +declare namespace Checkin { + export type AsObject = { + id: string, + address: string, + signature: string, + status?: Checkin.Status.AsObject, + version: string, + metricsport: number, + remoteip: string, + } + + + export class Status extends jspb.Message { + getUptime(): number; + setUptime(value: number): Status; + getQueuedepth(): number; + setQueuedepth(value: number): Status; + + hasLastHeartbeat(): boolean; + clearLastHeartbeat(): void; + getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; + setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Status.AsObject; + static toObject(includeInstance: boolean, msg: Status): Status.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Status; + static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; + } + + export namespace Status { + export type AsObject = { + uptime: number, + queuedepth: number, + lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } + } + +} + +declare class CheckinResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CheckinResp.AsObject; + static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CheckinResp; + static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; +} + +declare namespace CheckinResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class SyncTasksReq extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksReq; + getAddress(): string; + setAddress(value: string): SyncTasksReq; + getSignature(): string; + setSignature(value: string): SyncTasksReq; + getMonotonicClock(): number; + setMonotonicClock(value: number): SyncTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksReq; + static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; +} + +declare namespace SyncTasksReq { + export type AsObject = { + id: string, + address: string, + signature: string, + monotonicClock: number, + } +} + +declare class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} + +declare namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} + +declare class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; +} + +declare namespace CronCondition { + export type AsObject = { + scheduleList: Array, + } +} + +declare class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; +} + +declare namespace BlockCondition { + export type AsObject = { + interval: number, + } +} + +declare class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; +} + +declare namespace EventCondition { + export type AsObject = { + expression: string, + } +} + +declare class TaskTrigger$1 extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger$1; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger$1; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger$1; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger$1; + + getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; + static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; +} + +declare namespace TaskTrigger$1 { + export type AsObject = { + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, + } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + +} + +declare class SyncTasksResp extends jspb.Message { + getId(): string; + setId(value: string): SyncTasksResp; + getChecktype(): string; + setChecktype(value: string): SyncTasksResp; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): SyncTasksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SyncTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SyncTasksResp; + static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; +} + +declare namespace SyncTasksResp { + export type AsObject = { + id: string, + checktype: string, + trigger?: TaskTrigger$1.AsObject, + } +} + +declare class ETHTransferNode extends jspb.Message { + getDestination(): string; + setDestination(value: string): ETHTransferNode; + getAmount(): string; + setAmount(value: string): ETHTransferNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; +} + +declare namespace ETHTransferNode { + export type AsObject = { + destination: string, + amount: string, + } +} + +declare class ContractWriteNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractWriteNode; + getCallData(): string; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; +} + +declare namespace ContractWriteNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +declare namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class GraphQLQueryNode extends jspb.Message { + getUrl(): string; + setUrl(value: string): GraphQLQueryNode; + getQuery(): string; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; +} + +declare namespace GraphQLQueryNode { + export type AsObject = { + url: string, + query: string, + + variablesMap: Array<[string, string]>, + } +} + +declare class RestAPINode extends jspb.Message { + getUrl(): string; + setUrl(value: string): RestAPINode; + + getHeadersMap(): jspb.Map; + clearHeadersMap(): void; + getBody(): string; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; +} + +declare namespace RestAPINode { + export type AsObject = { + url: string, + + headersMap: Array<[string, string]>, + body: string, + method: string, + } +} + +declare class CustomCodeNode extends jspb.Message { + getType(): CustomCodeType; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; +} + +declare namespace CustomCodeNode { + export type AsObject = { + type: CustomCodeType, + source: string, + } +} + +declare class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; + getExpression(): string; + setExpression(value: string): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; +} + +declare namespace Condition { + export type AsObject = { + id: string, + type: string, + expression: string, + } +} + +declare class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +declare namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} + +declare class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; +} + +declare namespace FilterNode { + export type AsObject = { + expression: string, + } +} + +declare class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +declare namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + +declare class TaskEdge$1 extends jspb.Message { + getId(): string; + setId(value: string): TaskEdge$1; + getSource(): string; + setSource(value: string): TaskEdge$1; + getTarget(): string; + setTarget(value: string): TaskEdge$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge$1; + static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; +} + +declare namespace TaskEdge$1 { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +declare class TaskNode$1 extends jspb.Message { + getId(): string; + setId(value: string): TaskNode$1; + getName(): string; + setName(value: string): TaskNode$1; + + hasEthTransfer(): boolean; + clearEthTransfer(): void; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode$1; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode$1; + + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode$1; + + hasGraphqlDataQuery(): boolean; + clearGraphqlDataQuery(): void; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode$1; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode$1; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode$1; + + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode$1; + + hasCustomCode(): boolean; + clearCustomCode(): void; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode$1; + + getTaskTypeCase(): TaskNode$1.TaskTypeCase; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskNode$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode$1; + static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; +} + +declare namespace TaskNode$1 { + export type AsObject = { + id: string, + name: string, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, + } + + export enum TaskTypeCase { + TASK_TYPE_NOT_SET = 0, + ETH_TRANSFER = 10, + CONTRACT_WRITE = 11, + CONTRACT_READ = 12, + GRAPHQL_DATA_QUERY = 13, + REST_API = 14, + BRANCH = 15, + FILTER = 16, + LOOP = 17, + CUSTOM_CODE = 18, + } + +} + +declare class Execution$1 extends jspb.Message { + getEpoch(): number; + setEpoch(value: number): Execution$1; + getUserOpHash(): string; + setUserOpHash(value: string): Execution$1; + getError(): string; + setError(value: string): Execution$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Execution$1.AsObject; + static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution$1; + static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; +} + +declare namespace Execution$1 { + export type AsObject = { + epoch: number, + userOpHash: string, + error: string, + } +} + +declare class Task$1 extends jspb.Message { + getId(): string; + setId(value: string): Task$1; + getOwner(): string; + setOwner(value: string): Task$1; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task$1; + getStartAt(): number; + setStartAt(value: number): Task$1; + getExpiredAt(): number; + setExpiredAt(value: number): Task$1; + getMemo(): string; + setMemo(value: string): Task$1; + getCompletedAt(): number; + setCompletedAt(value: number): Task$1; + getMaxExecution(): number; + setMaxExecution(value: number): Task$1; + getStatus(): TaskStatus; + setStatus(value: TaskStatus): Task$1; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): Task$1; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; + clearExecutionsList(): void; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution$1, index?: number): Execution$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Task$1.AsObject; + static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Task$1; + static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; +} + +declare namespace Task$1 { + export type AsObject = { + id: string, + owner: string, + smartWalletAddress: string, + startAt: number, + expiredAt: number, + memo: string, + completedAt: number, + maxExecution: number, + status: TaskStatus, + trigger?: TaskTrigger$1.AsObject, + nodesList: Array, + edgesList: Array, + executionsList: Array, + } +} + +declare class CreateTaskReq extends jspb.Message { + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): CreateTaskReq; + getStartAt(): number; + setStartAt(value: number): CreateTaskReq; + getExpiredAt(): number; + setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; + getMemo(): string; + setMemo(value: string): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskReq.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskReq; + static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; +} + +declare namespace CreateTaskReq { + export type AsObject = { + trigger?: TaskTrigger$1.AsObject, + startAt: number, + expiredAt: number, + maxExecution: number, + smartWalletAddress: string, + memo: string, + nodesList: Array, + edgesList: Array, + } +} + +declare class CreateTaskResp extends jspb.Message { + getId(): string; + setId(value: string): CreateTaskResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateTaskResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateTaskResp; + static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; +} + +declare namespace CreateTaskResp { + export type AsObject = { + id: string, + } +} + +declare class NonceRequest extends jspb.Message { + getOwner(): string; + setOwner(value: string): NonceRequest; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceRequest.AsObject; + static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceRequest; + static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; +} + +declare namespace NonceRequest { + export type AsObject = { + owner: string, + } +} + +declare class NonceResp extends jspb.Message { + getNonce(): string; + setNonce(value: string): NonceResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): NonceResp.AsObject; + static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): NonceResp; + static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; +} + +declare namespace NonceResp { + export type AsObject = { + nonce: string, + } +} + +declare class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; +} + +declare namespace ListWalletReq { + export type AsObject = { + factory: string, + salt: string, + } +} + +declare class SmartWallet$1 extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet$1; + getSalt(): string; + setSalt(value: string): SmartWallet$1; + getFactory(): string; + setFactory(value: string): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SmartWallet$1.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet$1; + static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; +} + +declare namespace SmartWallet$1 { + export type AsObject = { + address: string, + salt: string, + factory: string, + } +} + +declare class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +declare namespace ListWalletResp { + export type AsObject = { + walletsList: Array, + } +} + +declare class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksReq.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksReq; + static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; +} + +declare namespace ListTasksReq { + export type AsObject = { + smartWalletAddress: string, + } +} + +declare class ListTasksResp extends jspb.Message { + clearTasksList(): void; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task$1, index?: number): Task$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListTasksResp.AsObject; + static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListTasksResp; + static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; +} + +declare namespace ListTasksResp { + export type AsObject = { + tasksList: Array, + } +} + +declare class GetKeyReq extends jspb.Message { + getOwner(): string; + setOwner(value: string): GetKeyReq; + getExpiredAt(): number; + setExpiredAt(value: number): GetKeyReq; + getSignature(): string; + setSignature(value: string): GetKeyReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetKeyReq.AsObject; + static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetKeyReq; + static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; +} + +declare namespace GetKeyReq { + export type AsObject = { + owner: string, + expiredAt: number, + signature: string, + } +} + +declare class KeyResp extends jspb.Message { + getKey(): string; + setKey(value: string): KeyResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): KeyResp.AsObject; + static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): KeyResp; + static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; +} + +declare namespace KeyResp { + export type AsObject = { + key: string, + } +} + +declare class UpdateChecksReq extends jspb.Message { + getAddress(): string; + setAddress(value: string): UpdateChecksReq; + getSignature(): string; + setSignature(value: string): UpdateChecksReq; + clearIdList(): void; + getIdList(): Array; + setIdList(value: Array): UpdateChecksReq; + addId(value: string, index?: number): string; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; + static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; +} + +declare namespace UpdateChecksReq { + export type AsObject = { + address: string, + signature: string, + idList: Array, + } +} + +declare class UpdateChecksResp extends jspb.Message { + + hasUpdatedAt(): boolean; + clearUpdatedAt(): void; + getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; + setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; + static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; + static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; +} + +declare namespace UpdateChecksResp { + export type AsObject = { + updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, + } +} + +declare class CreateWalletReq$1 extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq$1; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; + static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; +} + +declare namespace CreateWalletReq$1 { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +declare class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; +} + +declare namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } +} + +declare enum TaskStatus { + ACTIVE = 0, + COMPLETED = 1, + FAILED = 2, + CANCELED = 3, + EXECUTING = 4, +} + +declare enum CustomCodeType { + JAVASCRIPT = 0, +} + +// package: aggregator +// file: avs.proto + + + +interface IAggregatorClient { + getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +declare class AggregatorClient extends grpc.Client implements IAggregatorClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; +} + +type Environment = "production" | "development" | "staging"; +declare const AUTH_KEY_HEADER = "authkey"; +interface RequestOptions { + authKey: string; +} +interface GetKeyResponse { + authKey: string; +} +interface ClientOption { + endpoint: string; +} +interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[]; + }; + block?: { + interval: number; + }; +} +interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} +interface TaskType { + id: string; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + status: number; + maxExecution: number; + executions: Execution[]; +} +interface CreateTaskResponse { + id: string; +} +interface ListTasksResponse { + tasks: { + id: string; + status: string; + }[]; +} +interface CancelTaskResponse { + value: boolean; +} +interface DeleteTaskResponse { + value: boolean; +} +interface SmartWallet { + address: string; + salt: string; + factory: string; +} +interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} +interface Execution { + epoch: number; + userOpHash: string; + error: string; +} +interface TaskEdge { + id: string; + source: string; + target: string; +} + +declare class Task implements TaskType { + id: string; + status: number; + owner: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + maxExecution: number; + executions: Execution[]; + constructor(task: Task$1); +} + +declare class BaseClient { + readonly endpoint: string; + readonly rpcClient: AggregatorClient; + protected metadata: Metadata; + constructor(opts: ClientOption); + isAuthKeyValid(key: string): boolean; + authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; + authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; + protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; + protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; +} +declare class Client extends BaseClient { + constructor(config: ClientOption); + listSmartWallets(options: RequestOptions): Promise; + createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; + createTask(payload: any, options: RequestOptions): Promise; + listTasks(address: string, options: RequestOptions): Promise; + getTask(id: string, options: RequestOptions): Promise; + cancelTask(id: string, options: RequestOptions): Promise; + deleteTask(id: string, options: RequestOptions): Promise; +} + +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.js b/dist/index.js new file mode 100644 index 0000000..0b04d1f --- /dev/null +++ b/dist/index.js @@ -0,0 +1,5735 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// grpc_codegen/avs_pb.js +var require_avs_pb = __commonJS({ + "grpc_codegen/avs_pb.js"(exports2) { + "use strict"; + var jspb = require("google-protobuf"); + var goog = jspb; + var global = function() { + if (this) { + return this; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + if (typeof self !== "undefined") { + return self; + } + return Function("return this")(); + }.call(null); + var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); + goog.object.extend(proto, google_protobuf_timestamp_pb); + var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); + goog.object.extend(proto, google_protobuf_wrappers_pb); + goog.exportSymbol("proto.aggregator.BlockCondition", null, global); + goog.exportSymbol("proto.aggregator.BranchNode", null, global); + goog.exportSymbol("proto.aggregator.Checkin", null, global); + goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); + goog.exportSymbol("proto.aggregator.CheckinResp", null, global); + goog.exportSymbol("proto.aggregator.Condition", null, global); + goog.exportSymbol("proto.aggregator.ContractReadNode", null, global); + goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); + goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); + goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletReq", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletResp", null, global); + goog.exportSymbol("proto.aggregator.CronCondition", null, global); + goog.exportSymbol("proto.aggregator.CustomCodeNode", null, global); + goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); + goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global); + goog.exportSymbol("proto.aggregator.Error", null, global); + goog.exportSymbol("proto.aggregator.EventCondition", null, global); + goog.exportSymbol("proto.aggregator.Execution", null, global); + goog.exportSymbol("proto.aggregator.FilterNode", null, global); + goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); + goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); + goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); + goog.exportSymbol("proto.aggregator.IdReq", null, global); + goog.exportSymbol("proto.aggregator.KeyResp", null, global); + goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); + goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); + goog.exportSymbol("proto.aggregator.ListWalletReq", null, global); + goog.exportSymbol("proto.aggregator.ListWalletResp", null, global); + goog.exportSymbol("proto.aggregator.LoopNode", null, global); + goog.exportSymbol("proto.aggregator.NonceRequest", null, global); + goog.exportSymbol("proto.aggregator.NonceResp", null, global); + goog.exportSymbol("proto.aggregator.RestAPINode", null, global); + goog.exportSymbol("proto.aggregator.SmartWallet", null, global); + goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); + goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); + goog.exportSymbol("proto.aggregator.Task", null, global); + goog.exportSymbol("proto.aggregator.TaskEdge", null, global); + goog.exportSymbol("proto.aggregator.TaskNode", null, global); + goog.exportSymbol("proto.aggregator.TaskNode.TaskTypeCase", null, global); + goog.exportSymbol("proto.aggregator.TaskStatus", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global); + goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); + goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); + proto.aggregator.IdReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.IdReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; + } + proto.aggregator.Checkin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Checkin, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; + } + proto.aggregator.Checkin.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Checkin.Status.displayName = "proto.aggregator.Checkin.Status"; + } + proto.aggregator.CheckinResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CheckinResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; + } + proto.aggregator.SyncTasksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; + } + proto.aggregator.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; + } + proto.aggregator.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.CronCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; + } + proto.aggregator.BlockCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.BlockCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; + } + proto.aggregator.EventCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.EventCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; + } + proto.aggregator.TaskTrigger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + } + proto.aggregator.SyncTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; + } + proto.aggregator.ETHTransferNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; + } + proto.aggregator.ContractWriteNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; + } + proto.aggregator.ContractReadNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; + } + proto.aggregator.GraphQLQueryNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; + } + proto.aggregator.RestAPINode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.RestAPINode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; + } + proto.aggregator.CustomCodeNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; + } + proto.aggregator.Condition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Condition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; + } + proto.aggregator.BranchNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.BranchNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; + } + proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.FilterNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; + } + proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.LoopNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; + } + proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.TaskEdge, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; + } + proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; + } + proto.aggregator.Execution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Execution, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; + } + proto.aggregator.Task = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.Task, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Task.displayName = "proto.aggregator.Task"; + } + proto.aggregator.CreateTaskReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; + } + proto.aggregator.CreateTaskResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateTaskResp.displayName = "proto.aggregator.CreateTaskResp"; + } + proto.aggregator.NonceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.NonceRequest, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; + } + proto.aggregator.NonceResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.NonceResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; + } + proto.aggregator.ListWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; + } + proto.aggregator.SmartWallet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.SmartWallet, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; + } + proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; + } + proto.aggregator.ListTasksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; + } + proto.aggregator.ListTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; + } + proto.aggregator.GetKeyReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; + } + proto.aggregator.KeyResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.KeyResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; + } + proto.aggregator.UpdateChecksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.UpdateChecksReq.displayName = "proto.aggregator.UpdateChecksReq"; + } + proto.aggregator.UpdateChecksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; + } + proto.aggregator.CreateWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; + } + proto.aggregator.CreateWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; + } + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.IdReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.IdReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.IdReq(); + return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.IdReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.IdReq.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.IdReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.toObject(opt_includeInstance, this); + }; + proto.aggregator.Checkin.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Checkin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Checkin(); + return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Checkin.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 4: + var value = new proto.aggregator.Checkin.Status(); + reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); + msg.setStatus(value); + break; + case 5: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setVersion(value); + break; + case 6: + var value = ( + /** @type {number} */ + reader.readInt32() + ); + msg.setMetricsport(value); + break; + case 7: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setRemoteip(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Checkin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.Checkin.Status.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMetricsport(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getRemoteip(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); + }; + proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { + var f, obj = { + uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), + queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), + lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Checkin.Status(); + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setUptime(value); + break; + case 2: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setQueuedepth(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp(); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastHeartbeat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUptime(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getQueuedepth(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLastHeartbeat(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.Checkin.Status.prototype.getUptime = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); + }; + proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) + ); + }; + proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); + }; + proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) + ); + }; + proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); + }; + proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { + return this.setLastHeartbeat(void 0); + }; + proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.Checkin.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Checkin.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Checkin.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Checkin.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Checkin.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Checkin.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Checkin.prototype.getStatus = function() { + return ( + /** @type{?proto.aggregator.Checkin.Status} */ + jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) + ); + }; + proto.aggregator.Checkin.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 4, value); + }; + proto.aggregator.Checkin.prototype.clearStatus = function() { + return this.setStatus(void 0); + }; + proto.aggregator.Checkin.prototype.hasStatus = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.Checkin.prototype.getVersion = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 5, "") + ); + }; + proto.aggregator.Checkin.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); + }; + proto.aggregator.Checkin.prototype.getMetricsport = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 6, 0) + ); + }; + proto.aggregator.Checkin.prototype.setMetricsport = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); + }; + proto.aggregator.Checkin.prototype.getRemoteip = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 7, "") + ); + }; + proto.aggregator.Checkin.prototype.setRemoteip = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CheckinResp(); + return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp(); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CheckinResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) + ); + }; + proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(void 0); + }; + proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksReq(); + return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 4: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setMonotonicClock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMonotonicClock(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + }; + proto.aggregator.SyncTasksReq.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.SyncTasksReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.SyncTasksReq.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.SyncTasksReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) + ); + }; + proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); + }; + proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { + var f, obj = { + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FixedEpochCondition(); + return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = ( + /** @type {!Array} */ + reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] + ); + for (var i = 0; i < values.length; i++) { + msg.addEpochs(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getEpochsList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f + ); + } + }; + proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) + ); + }; + proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { + return jspb.Message.setField(this, 1, value || []); + }; + proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); + }; + proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); + }; + proto.aggregator.CronCondition.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { + var f, obj = { + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CronCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CronCondition(); + return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.addSchedule(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CronCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getScheduleList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + }; + proto.aggregator.CronCondition.prototype.getScheduleList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) + ); + }; + proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { + return jspb.Message.setField(this, 1, value || []); + }; + proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); + }; + proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { + var f, obj = { + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.BlockCondition(); + return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setInterval(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.BlockCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + }; + proto.aggregator.BlockCondition.prototype.getInterval = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.EventCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.EventCondition(); + return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.EventCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.EventCondition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.EventCondition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; + proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 + }; + proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { + return ( + /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) + ); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + var f, obj = { + manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskTrigger(); + return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {boolean} */ + reader.readBool() + ); + msg.setManual(value); + break; + case 2: + var value = new proto.aggregator.FixedEpochCondition(); + reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); + break; + case 3: + var value = new proto.aggregator.CronCondition(); + reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 4: + var value = new proto.aggregator.BlockCondition(); + reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 5: + var value = new proto.aggregator.EventCondition(); + reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = /** @type {boolean} */ + jspb.Message.getField(message, 1); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskTrigger.prototype.getManual = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; + proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 1) != null; + }; + proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { + return ( + /** @type{?proto.aggregator.FixedEpochCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) + ); + }; + proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; + }; + proto.aggregator.TaskTrigger.prototype.getCron = function() { + return ( + /** @type{?proto.aggregator.CronCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) + ); + }; + proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return ( + /** @type{?proto.aggregator.BlockCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) + ); + }; + proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return ( + /** @type{?proto.aggregator.EventCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) + ); + }; + proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 5) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksResp(); + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setChecktype(value); + break; + case 3: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChecktype(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + }; + proto.aggregator.SyncTasksResp.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.SyncTasksResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) + ); + }; + proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 3, value); + }; + proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 3) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { + var f, obj = { + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ETHTransferNode(); + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setDestination(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getDestination(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.ETHTransferNode.prototype.getDestination = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ETHTransferNode.prototype.getAmount = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ContractWriteNode(); + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ContractWriteNode.prototype.getCallData = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ContractReadNode(); + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ContractReadNode.prototype.getCallData = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.GraphQLQueryNode(); + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setUrl(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + }; + proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 3, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); + }; + proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.RestAPINode(); + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setUrl(value); + break; + case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setBody(value); + break; + case 4: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMethod(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.RestAPINode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + }; + proto.aggregator.RestAPINode.prototype.getUrl = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 2, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this; + }; + proto.aggregator.RestAPINode.prototype.getBody = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.RestAPINode.prototype.getMethod = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CustomCodeNode(); + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {!proto.aggregator.CustomCodeType} */ + reader.readEnum() + ); + msg.setType(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getType(); + if (f !== 0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CustomCodeNode.prototype.getType = function() { + return ( + /** @type {!proto.aggregator.CustomCodeType} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.CustomCodeNode.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); + }; + proto.aggregator.CustomCodeNode.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); + }; + proto.aggregator.Condition.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Condition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Condition(); + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setType(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.Condition.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Condition.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Condition.prototype.getType = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Condition.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Condition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.BranchNode.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { + var f, obj = { + conditionsList: jspb.Message.toObjectList( + msg.getConditionsList(), + proto.aggregator.Condition.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.BranchNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.BranchNode(); + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.Condition(); + reader.readMessage(value, proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getConditionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Condition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) + ); + }; + proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); + }; + proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode(); + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.FilterNode.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode(); + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterVar(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.LoopNode.prototype.getIterVar = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.LoopNode.prototype.getIterKey = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge(); + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.TaskEdge.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TaskEdge.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.TaskEdge.prototype.getTarget = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; + proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + LOOP: 17, + CUSTOM_CODE: 18 + }; + proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { + return ( + /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) + ); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskNode(); + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setName(value); + break; + case 10: + var value = new proto.aggregator.ETHTransferNode(); + reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); + msg.setEthTransfer(value); + break; + case 11: + var value = new proto.aggregator.ContractWriteNode(); + reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); + break; + case 12: + var value = new proto.aggregator.ContractReadNode(); + reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); + break; + case 13: + var value = new proto.aggregator.GraphQLQueryNode(); + reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); + break; + case 14: + var value = new proto.aggregator.RestAPINode(); + reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); + break; + case 15: + var value = new proto.aggregator.BranchNode(); + reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); + msg.setBranch(value); + break; + case 16: + var value = new proto.aggregator.FilterNode(); + reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.LoopNode(); + reader.readMessage(value, proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: + var value = new proto.aggregator.CustomCodeNode(); + reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEthTransfer(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.ETHTransferNode.serializeBinaryToWriter + ); + } + f = message.getContractWrite(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.aggregator.ContractWriteNode.serializeBinaryToWriter + ); + } + f = message.getContractRead(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.aggregator.ContractReadNode.serializeBinaryToWriter + ); + } + f = message.getGraphqlDataQuery(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter + ); + } + f = message.getRestApi(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.aggregator.RestAPINode.serializeBinaryToWriter + ); + } + f = message.getBranch(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getLoop(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskNode.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.TaskNode.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.TaskNode.prototype.getName = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.TaskNode.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.TaskNode.prototype.getEthTransfer = function() { + return ( + /** @type{?proto.aggregator.ETHTransferNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) + ); + }; + proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { + return this.setEthTransfer(void 0); + }; + proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; + }; + proto.aggregator.TaskNode.prototype.getContractWrite = function() { + return ( + /** @type{?proto.aggregator.ContractWriteNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) + ); + }; + proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(void 0); + }; + proto.aggregator.TaskNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; + }; + proto.aggregator.TaskNode.prototype.getContractRead = function() { + return ( + /** @type{?proto.aggregator.ContractReadNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) + ); + }; + proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(void 0); + }; + proto.aggregator.TaskNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; + }; + proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { + return ( + /** @type{?proto.aggregator.GraphQLQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) + ); + }; + proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(void 0); + }; + proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; + }; + proto.aggregator.TaskNode.prototype.getRestApi = function() { + return ( + /** @type{?proto.aggregator.RestAPINode} */ + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) + ); + }; + proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(void 0); + }; + proto.aggregator.TaskNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; + }; + proto.aggregator.TaskNode.prototype.getBranch = function() { + return ( + /** @type{?proto.aggregator.BranchNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) + ); + }; + proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearBranch = function() { + return this.setBranch(void 0); + }; + proto.aggregator.TaskNode.prototype.hasBranch = function() { + return jspb.Message.getField(this, 15) != null; + }; + proto.aggregator.TaskNode.prototype.getFilter = function() { + return ( + /** @type{?proto.aggregator.FilterNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) + ); + }; + proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(void 0); + }; + proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; + }; + proto.aggregator.TaskNode.prototype.getLoop = function() { + return ( + /** @type{?proto.aggregator.LoopNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(void 0); + }; + proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; + }; + proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return ( + /** @type{?proto.aggregator.CustomCodeNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) + ); + }; + proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(void 0); + }; + proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 18) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Execution.toObject(opt_includeInstance, this); + }; + proto.aggregator.Execution.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + error: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Execution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Execution(); + return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setEpoch(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setUserOpHash(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Execution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Execution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getEpoch(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getUserOpHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.Execution.prototype.getEpoch = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.Execution.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); + }; + proto.aggregator.Execution.prototype.getUserOpHash = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Execution.prototype.setUserOpHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Execution.prototype.getError = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Execution.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Task.toObject(opt_includeInstance, this); + }; + proto.aggregator.Task.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), + status: jspb.Message.getFieldWithDefault(msg, 9, 0), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + nodesList: jspb.Message.toObjectList( + msg.getNodesList(), + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ), + executionsList: jspb.Message.toObjectList( + msg.getExecutionsList(), + proto.aggregator.Execution.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Task.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Task(); + return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setOwner(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; + case 4: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setStartAt(value); + break; + case 5: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setExpiredAt(value); + break; + case 6: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMemo(value); + break; + case 7: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setCompletedAt(value); + break; + case 8: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setMaxExecution(value); + break; + case 9: + var value = ( + /** @type {!proto.aggregator.TaskStatus} */ + reader.readEnum() + ); + msg.setStatus(value); + break; + case 10: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 11: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 12: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: + var value = new proto.aggregator.Execution(); + reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); + msg.addExecutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Task.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Task.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCompletedAt(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getStatus(); + if (f !== 0) { + writer.writeEnum( + 9, + f + ); + } + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + f = message.getExecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.aggregator.Execution.serializeBinaryToWriter + ); + } + }; + proto.aggregator.Task.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Task.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Task.prototype.getOwner = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Task.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Task.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Task.prototype.getStartAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) + ); + }; + proto.aggregator.Task.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); + }; + proto.aggregator.Task.prototype.getExpiredAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 5, 0) + ); + }; + proto.aggregator.Task.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); + }; + proto.aggregator.Task.prototype.getMemo = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") + ); + }; + proto.aggregator.Task.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.Task.prototype.getCompletedAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 7, 0) + ); + }; + proto.aggregator.Task.prototype.setCompletedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); + }; + proto.aggregator.Task.prototype.getMaxExecution = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 8, 0) + ); + }; + proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); + }; + proto.aggregator.Task.prototype.getStatus = function() { + return ( + /** @type {!proto.aggregator.TaskStatus} */ + jspb.Message.getFieldWithDefault(this, 9, 0) + ); + }; + proto.aggregator.Task.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); + }; + proto.aggregator.Task.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) + ); + }; + proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 10, value); + }; + proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 10) != null; + }; + proto.aggregator.Task.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) + ); + }; + proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); + }; + proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.Task.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) + ); + }; + proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); + }; + proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); + }; + proto.aggregator.Task.prototype.getExecutionsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) + ); + }; + proto.aggregator.Task.prototype.setExecutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); + }; + proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); + }; + proto.aggregator.Task.prototype.clearExecutionsList = function() { + return this.setExecutionsList([]); + }; + proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { + var f, obj = { + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + nodesList: jspb.Message.toObjectList( + msg.getNodesList(), + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateTaskReq(); + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 2: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setStartAt(value); + break; + case 3: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setExpiredAt(value); + break; + case 4: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setMaxExecution(value); + break; + case 5: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; + case 6: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + }; + proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 1) != null; + }; + proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); + }; + proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 3, 0) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); + }; + proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); + }; + proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 5, "") + ); + }; + proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); + }; + proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") + ); + }; + proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); + }; + proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); + }; + proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateTaskResp(); + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.CreateTaskResp.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateTaskResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); + }; + proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceRequest(); + return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.NonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.NonceRequest.prototype.getOwner = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.NonceRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { + var f, obj = { + nonce: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.NonceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceResp(); + return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setNonce(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.NonceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getNonce(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.NonceResp.prototype.getNonce = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.NonceResp.prototype.setNonce = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListWalletReq(); + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.ListWalletReq.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ListWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); + }; + proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SmartWallet(); + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.SmartWallet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.SmartWallet.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.SmartWallet.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.SmartWallet.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.ListWalletResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList( + msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListWalletResp(); + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet(); + reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } + }; + proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) + ); + }; + proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); + }; + proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListTasksReq(); + return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ListTasksResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + tasksList: jspb.Message.toObjectList( + msg.getTasksList(), + proto.aggregator.Task.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListTasksResp(); + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.Task(); + reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTasksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); + } + }; + proto.aggregator.ListTasksResp.prototype.getTasksList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) + ); + }; + proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); + }; + proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { + return this.setTasksList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.GetKeyReq(); + return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setOwner(value); + break; + case 2: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setExpiredAt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.GetKeyReq.prototype.getOwner = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) + ); + }; + proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); + }; + proto.aggregator.GetKeyReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.KeyResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.KeyResp(); + return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.KeyResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.KeyResp.prototype.getKey = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.KeyResp.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, ""), + idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksReq(); + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.addId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + }; + proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 3) + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); + }; + proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); + }; + proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksResp(); + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp(); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) + ); + }; + proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(void 0); + }; + proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletReq(); + return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CreateWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletResp(); + return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1e3, + STORAGEUNAVAILABLE: 2e3, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6e3, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7e3, + TASKDATAMISSINGERROR: 7001 + }; + proto.aggregator.TaskStatus = { + ACTIVE: 0, + COMPLETED: 1, + FAILED: 2, + CANCELED: 3, + EXECUTING: 4 + }; + proto.aggregator.CustomCodeType = { + JAVASCRIPT: 0 + }; + goog.object.extend(exports2, proto.aggregator); + } +}); + +// grpc_codegen/avs_grpc_pb.js +var require_avs_grpc_pb = __commonJS({ + "grpc_codegen/avs_grpc_pb.js"(exports2) { + "use strict"; + var grpc2 = require("@grpc/grpc-js"); + var avs_pb3 = require_avs_pb(); + var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); + function serialize_aggregator_Checkin(arg) { + if (!(arg instanceof avs_pb3.Checkin)) { + throw new Error("Expected argument of type aggregator.Checkin"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Checkin(buffer_arg) { + return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CheckinResp(arg) { + if (!(arg instanceof avs_pb3.CheckinResp)) { + throw new Error("Expected argument of type aggregator.CheckinResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CheckinResp(buffer_arg) { + return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskReq(arg) { + if (!(arg instanceof avs_pb3.CreateTaskReq)) { + throw new Error("Expected argument of type aggregator.CreateTaskReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskReq(buffer_arg) { + return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskResp(arg) { + if (!(arg instanceof avs_pb3.CreateTaskResp)) { + throw new Error("Expected argument of type aggregator.CreateTaskResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskResp(buffer_arg) { + return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb3.CreateWalletReq)) { + throw new Error("Expected argument of type aggregator.CreateWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb3.CreateWalletResp)) { + throw new Error("Expected argument of type aggregator.CreateWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_GetKeyReq(arg) { + if (!(arg instanceof avs_pb3.GetKeyReq)) { + throw new Error("Expected argument of type aggregator.GetKeyReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_GetKeyReq(buffer_arg) { + return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb3.IdReq)) { + throw new Error("Expected argument of type aggregator.IdReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_KeyResp(arg) { + if (!(arg instanceof avs_pb3.KeyResp)) { + throw new Error("Expected argument of type aggregator.KeyResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_KeyResp(buffer_arg) { + return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksReq(arg) { + if (!(arg instanceof avs_pb3.ListTasksReq)) { + throw new Error("Expected argument of type aggregator.ListTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksReq(buffer_arg) { + return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksResp(arg) { + if (!(arg instanceof avs_pb3.ListTasksResp)) { + throw new Error("Expected argument of type aggregator.ListTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksResp(buffer_arg) { + return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb3.ListWalletReq)) { + throw new Error("Expected argument of type aggregator.ListWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb3.ListWalletResp)) { + throw new Error("Expected argument of type aggregator.ListWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceRequest(arg) { + if (!(arg instanceof avs_pb3.NonceRequest)) { + throw new Error("Expected argument of type aggregator.NonceRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceRequest(buffer_arg) { + return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceResp(arg) { + if (!(arg instanceof avs_pb3.NonceResp)) { + throw new Error("Expected argument of type aggregator.NonceResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceResp(buffer_arg) { + return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksReq(arg) { + if (!(arg instanceof avs_pb3.SyncTasksReq)) { + throw new Error("Expected argument of type aggregator.SyncTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksReq(buffer_arg) { + return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksResp(arg) { + if (!(arg instanceof avs_pb3.SyncTasksResp)) { + throw new Error("Expected argument of type aggregator.SyncTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksResp(buffer_arg) { + return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb3.Task)) { + throw new Error("Expected argument of type aggregator.Task"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Task(buffer_arg) { + return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksReq(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksReq)) { + throw new Error("Expected argument of type aggregator.UpdateChecksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksReq(buffer_arg) { + return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksResp(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksResp)) { + throw new Error("Expected argument of type aggregator.UpdateChecksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksResp(buffer_arg) { + return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_google_protobuf_BoolValue(arg) { + if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { + throw new Error("Expected argument of type google.protobuf.BoolValue"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_google_protobuf_BoolValue(buffer_arg) { + return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); + } + var AggregatorService = exports2.AggregatorService = { + // Auth + getKey: { + path: "/aggregator.Aggregator/GetKey", + requestStream: false, + responseStream: false, + requestType: avs_pb3.GetKeyReq, + responseType: avs_pb3.KeyResp, + requestSerialize: serialize_aggregator_GetKeyReq, + requestDeserialize: deserialize_aggregator_GetKeyReq, + responseSerialize: serialize_aggregator_KeyResp, + responseDeserialize: deserialize_aggregator_KeyResp + }, + // Smart Acccount + getNonce: { + path: "/aggregator.Aggregator/GetNonce", + requestStream: false, + responseStream: false, + requestType: avs_pb3.NonceRequest, + responseType: avs_pb3.NonceResp, + requestSerialize: serialize_aggregator_NonceRequest, + requestDeserialize: deserialize_aggregator_NonceRequest, + responseSerialize: serialize_aggregator_NonceResp, + responseDeserialize: deserialize_aggregator_NonceResp + }, + createWallet: { + path: "/aggregator.Aggregator/CreateWallet", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateWalletReq, + responseType: avs_pb3.CreateWalletResp, + requestSerialize: serialize_aggregator_CreateWalletReq, + requestDeserialize: deserialize_aggregator_CreateWalletReq, + responseSerialize: serialize_aggregator_CreateWalletResp, + responseDeserialize: deserialize_aggregator_CreateWalletResp + }, + listWallets: { + path: "/aggregator.Aggregator/ListWallets", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListWalletReq, + responseType: avs_pb3.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp + }, + // Task Management + createTask: { + path: "/aggregator.Aggregator/CreateTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateTaskReq, + responseType: avs_pb3.CreateTaskResp, + requestSerialize: serialize_aggregator_CreateTaskReq, + requestDeserialize: deserialize_aggregator_CreateTaskReq, + responseSerialize: serialize_aggregator_CreateTaskResp, + responseDeserialize: deserialize_aggregator_CreateTaskResp + }, + listTasks: { + path: "/aggregator.Aggregator/ListTasks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListTasksReq, + responseType: avs_pb3.ListTasksResp, + requestSerialize: serialize_aggregator_ListTasksReq, + requestDeserialize: deserialize_aggregator_ListTasksReq, + responseSerialize: serialize_aggregator_ListTasksResp, + responseDeserialize: deserialize_aggregator_ListTasksResp + }, + getTask: { + path: "/aggregator.Aggregator/GetTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: avs_pb3.Task, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_aggregator_Task, + responseDeserialize: deserialize_aggregator_Task + }, + cancelTask: { + path: "/aggregator.Aggregator/CancelTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + deleteTask: { + path: "/aggregator.Aggregator/DeleteTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + // Operator endpoint + ping: { + path: "/aggregator.Aggregator/Ping", + requestStream: false, + responseStream: false, + requestType: avs_pb3.Checkin, + responseType: avs_pb3.CheckinResp, + requestSerialize: serialize_aggregator_Checkin, + requestDeserialize: deserialize_aggregator_Checkin, + responseSerialize: serialize_aggregator_CheckinResp, + responseDeserialize: deserialize_aggregator_CheckinResp + }, + syncTasks: { + path: "/aggregator.Aggregator/SyncTasks", + requestStream: false, + responseStream: true, + requestType: avs_pb3.SyncTasksReq, + responseType: avs_pb3.SyncTasksResp, + requestSerialize: serialize_aggregator_SyncTasksReq, + requestDeserialize: deserialize_aggregator_SyncTasksReq, + responseSerialize: serialize_aggregator_SyncTasksResp, + responseDeserialize: deserialize_aggregator_SyncTasksResp + }, + updateChecks: { + path: "/aggregator.Aggregator/UpdateChecks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.UpdateChecksReq, + responseType: avs_pb3.UpdateChecksResp, + requestSerialize: serialize_aggregator_UpdateChecksReq, + requestDeserialize: deserialize_aggregator_UpdateChecksReq, + responseSerialize: serialize_aggregator_UpdateChecksResp, + responseDeserialize: deserialize_aggregator_UpdateChecksResp + } + }; + exports2.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); + } +}); + +// src/index.ts +var src_exports = {}; +__export(src_exports, { + AUTH_KEY_HEADER: () => AUTH_KEY_HEADER, + default: () => Client, + getKeyRequestMessage: () => getKeyRequestMessage +}); +module.exports = __toCommonJS(src_exports); +var import_lodash = __toESM(require("lodash")); +var grpc = __toESM(require("@grpc/grpc-js")); +var import_grpc_js = require("@grpc/grpc-js"); + +// src/auth.ts +var getKeyRequestMessage = (address, expiredAt) => { + return `key request for ${address} expired at ${expiredAt}`; +}; + +// src/index.ts +var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); +var avs_pb2 = __toESM(require_avs_pb()); + +// src/builder.ts +var avs_pb = __toESM(require_avs_pb()); +var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress2); + n.setCallData(callData); + if (contractABI) { + n.setContractAbi(contractABI); + } + return n; +}; +var buildContractRead = ({ contract_ddress, callData, contractABI }) => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + n.setContractAbi(n.contractABI); + } + return n; +}; +var buildGraphQL = ({ url, query, variables }) => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k, v] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); + } + return n; +}; +var buildRestAPI = ({ url, body, method, headers }) => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k, v] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); + } + return n; +}; +var buildBranch = ({ conditions }) => { + const n = new avs_pb.BranchNode(); + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + n.addConditions(condition); + } + return n; +}; +var buildFilter = ({ expression }) => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +}; +var buildTaskEdge = ({ id, source, target }) => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + return edge; +}; +var buildTaskNode = (node) => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode(); + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + return n; +}; +var buildTrigger = (payload) => { + const trigger = new avs_pb.TaskTrigger(); + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + return trigger; + } + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + trigger.setEvent(event); + return trigger; + } + throw new Error("missing trigger"); + } +}; +var triggerFromGRPC = (trigger) => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; + } + const base = { + triggerType: trigger.getTriggerTypeCase() + }; + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() }; + break; + } + return base; +}; +var nodeFromGRPC = (node) => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + }; + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = { + conditions: base.branch.conditionsList + }; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; + } + return standarize; +}; +var taskEdgeFromGRPC = (edge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget() + }; +}; + +// src/task.ts +var Task = class { + constructor(task) { + this.id = task.getId() || ""; + this.status = task.getStatus(); + this.owner = task.getOwner(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); + this.startAt = task.getStartAt(); + this.expiredAt = task.getExpiredAt(); + this.memo = task.getMemo(); + this.completedAt = task.getCompletedAt(); + this.status = task.getStatus(); + this.executions = task.getExecutionsList().map((execution) => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError() + }; + }); + this.maxExecution = task.getMaxExecution(); + } +}; +var task_default = Task; + +// src/types.ts +var AUTH_KEY_HEADER = "authkey"; + +// src/index.ts +var BaseClient = class { + constructor(opts) { + this.endpoint = opts.endpoint; + this.rpcClient = new import_avs_grpc_pb.AggregatorClient( + this.endpoint, + grpc.credentials.createInsecure() + ); + this.metadata = new import_grpc_js.Metadata(); + } + isAuthKeyValid(key) { + try { + const [, payload] = key.split("."); + const decodedPayload = JSON.parse(atob(payload)); + const currentTimestamp = Math.floor(Date.now() / 1e3); + return decodedPayload.exp > currentTimestamp; + } catch (error) { + console.error("Error validating auth key:", error); + return false; + } + } + // When using the APIkey, depends on scope of the key, it may have access to one ore more account + async authWithAPIKey(address, apiKey, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); + request.setExpiredAt(expiredAtEpoch); + request.setSignature(apiKey); + const result = await this._callAnonRPC("getKey", request); + return { authKey: result.getKey() }; + } + // This flow can be used where the signature is generate from outside, such as in front-end and pass in + async authWithSignature(address, signature, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); + request.setExpiredAt(expiredAtEpoch); + request.setSignature(signature); + let result = await this._callAnonRPC( + "getKey", + request + ); + return { authKey: result.getKey() }; + } + _callRPC(method, request, options) { + const metadata = import_lodash.default.cloneDeep(this.metadata); + if (!options?.authKey) { + throw new Error("missing auth header"); + } + metadata.set(AUTH_KEY_HEADER, options.authKey); + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } + _callAnonRPC(method, request, options) { + const metadata = import_lodash.default.cloneDeep(this.metadata); + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } +}; +var Client = class extends BaseClient { + constructor(config) { + super(config); + } + async listSmartWallets(options) { + const request = new avs_pb2.ListWalletReq(); + const result = await this._callRPC("listWallets", request, options); + return result.getWalletsList().map((item) => item.toObject()); + } + async createWallet({ + salt, + factoryAddress + }, options) { + const request = new avs_pb2.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + const result = await this._callRPC("createWallet", request, options); + return { + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress() + }; + } + async createTask(payload, options) { + const request = new avs_pb2.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + request.setTrigger(buildTrigger(payload.trigger)); + for (const node of payload.nodes) { + request.addNodes(buildTaskNode(node)); + } + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + const result = await this._callRPC("createTask", request, options); + return result.getId(); + } + async listTasks(address, options) { + const request = new avs_pb2.ListTasksReq(); + request.setSmartWalletAddress(address); + const result = await this._callRPC("listTasks", request, options); + return result.getTasksList().map((item) => new task_default(item)); + } + // TODO: specify the return type to match client’s requirements + async getTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); + const result = await this._callRPC( + "getTask", + request, + options + ); + return new task_default(result); + } + async cancelTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); + const result = await this._callRPC( + "cancelTask", + request, + options + ); + return result.getValue(); + } + async deleteTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); + const result = await this._callRPC( + "deleteTask", + request, + options + ); + return result.getValue(); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + AUTH_KEY_HEADER, + getKeyRequestMessage +}); diff --git a/dist/index.mjs b/dist/index.mjs new file mode 100644 index 0000000..b0b0208 --- /dev/null +++ b/dist/index.mjs @@ -0,0 +1,5728 @@ +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); + +// grpc_codegen/avs_pb.js +var require_avs_pb = __commonJS({ + "grpc_codegen/avs_pb.js"(exports) { + "use strict"; + var jspb = __require("google-protobuf"); + var goog = jspb; + var global = function() { + if (this) { + return this; + } + if (typeof window !== "undefined") { + return window; + } + if (typeof global !== "undefined") { + return global; + } + if (typeof self !== "undefined") { + return self; + } + return Function("return this")(); + }.call(null); + var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); + goog.object.extend(proto, google_protobuf_timestamp_pb); + var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); + goog.object.extend(proto, google_protobuf_wrappers_pb); + goog.exportSymbol("proto.aggregator.BlockCondition", null, global); + goog.exportSymbol("proto.aggregator.BranchNode", null, global); + goog.exportSymbol("proto.aggregator.Checkin", null, global); + goog.exportSymbol("proto.aggregator.Checkin.Status", null, global); + goog.exportSymbol("proto.aggregator.CheckinResp", null, global); + goog.exportSymbol("proto.aggregator.Condition", null, global); + goog.exportSymbol("proto.aggregator.ContractReadNode", null, global); + goog.exportSymbol("proto.aggregator.ContractWriteNode", null, global); + goog.exportSymbol("proto.aggregator.CreateTaskReq", null, global); + goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletReq", null, global); + goog.exportSymbol("proto.aggregator.CreateWalletResp", null, global); + goog.exportSymbol("proto.aggregator.CronCondition", null, global); + goog.exportSymbol("proto.aggregator.CustomCodeNode", null, global); + goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); + goog.exportSymbol("proto.aggregator.ETHTransferNode", null, global); + goog.exportSymbol("proto.aggregator.Error", null, global); + goog.exportSymbol("proto.aggregator.EventCondition", null, global); + goog.exportSymbol("proto.aggregator.Execution", null, global); + goog.exportSymbol("proto.aggregator.FilterNode", null, global); + goog.exportSymbol("proto.aggregator.FixedEpochCondition", null, global); + goog.exportSymbol("proto.aggregator.GetKeyReq", null, global); + goog.exportSymbol("proto.aggregator.GraphQLQueryNode", null, global); + goog.exportSymbol("proto.aggregator.IdReq", null, global); + goog.exportSymbol("proto.aggregator.KeyResp", null, global); + goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); + goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); + goog.exportSymbol("proto.aggregator.ListWalletReq", null, global); + goog.exportSymbol("proto.aggregator.ListWalletResp", null, global); + goog.exportSymbol("proto.aggregator.LoopNode", null, global); + goog.exportSymbol("proto.aggregator.NonceRequest", null, global); + goog.exportSymbol("proto.aggregator.NonceResp", null, global); + goog.exportSymbol("proto.aggregator.RestAPINode", null, global); + goog.exportSymbol("proto.aggregator.SmartWallet", null, global); + goog.exportSymbol("proto.aggregator.SyncTasksReq", null, global); + goog.exportSymbol("proto.aggregator.SyncTasksResp", null, global); + goog.exportSymbol("proto.aggregator.Task", null, global); + goog.exportSymbol("proto.aggregator.TaskEdge", null, global); + goog.exportSymbol("proto.aggregator.TaskNode", null, global); + goog.exportSymbol("proto.aggregator.TaskNode.TaskTypeCase", null, global); + goog.exportSymbol("proto.aggregator.TaskStatus", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger", null, global); + goog.exportSymbol("proto.aggregator.TaskTrigger.TriggerTypeCase", null, global); + goog.exportSymbol("proto.aggregator.UpdateChecksReq", null, global); + goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); + proto.aggregator.IdReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.IdReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; + } + proto.aggregator.Checkin = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Checkin, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; + } + proto.aggregator.Checkin.Status = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Checkin.Status.displayName = "proto.aggregator.Checkin.Status"; + } + proto.aggregator.CheckinResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CheckinResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; + } + proto.aggregator.SyncTasksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; + } + proto.aggregator.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; + } + proto.aggregator.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.CronCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; + } + proto.aggregator.BlockCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.BlockCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; + } + proto.aggregator.EventCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.EventCondition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; + } + proto.aggregator.TaskTrigger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + } + proto.aggregator.SyncTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; + } + proto.aggregator.ETHTransferNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; + } + proto.aggregator.ContractWriteNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; + } + proto.aggregator.ContractReadNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; + } + proto.aggregator.GraphQLQueryNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; + } + proto.aggregator.RestAPINode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.RestAPINode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; + } + proto.aggregator.CustomCodeNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; + } + proto.aggregator.Condition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Condition, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; + } + proto.aggregator.BranchNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.BranchNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; + } + proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.FilterNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; + } + proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.LoopNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; + } + proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.TaskEdge, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; + } + proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); + }; + goog.inherits(proto.aggregator.TaskNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; + } + proto.aggregator.Execution = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.Execution, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; + } + proto.aggregator.Task = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.Task, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.Task.displayName = "proto.aggregator.Task"; + } + proto.aggregator.CreateTaskReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; + } + proto.aggregator.CreateTaskResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateTaskResp.displayName = "proto.aggregator.CreateTaskResp"; + } + proto.aggregator.NonceRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.NonceRequest, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; + } + proto.aggregator.NonceResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.NonceResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; + } + proto.aggregator.ListWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; + } + proto.aggregator.SmartWallet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.SmartWallet, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; + } + proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; + } + proto.aggregator.ListTasksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; + } + proto.aggregator.ListTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; + } + proto.aggregator.GetKeyReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; + } + proto.aggregator.KeyResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.KeyResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; + } + proto.aggregator.UpdateChecksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.UpdateChecksReq.displayName = "proto.aggregator.UpdateChecksReq"; + } + proto.aggregator.UpdateChecksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; + } + proto.aggregator.CreateWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; + } + proto.aggregator.CreateWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; + } + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.IdReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.IdReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.IdReq(); + return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.IdReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.IdReq.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.IdReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.toObject(opt_includeInstance, this); + }; + proto.aggregator.Checkin.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Checkin.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Checkin(); + return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Checkin.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 4: + var value = new proto.aggregator.Checkin.Status(); + reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); + msg.setStatus(value); + break; + case 5: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setVersion(value); + break; + case 6: + var value = ( + /** @type {number} */ + reader.readInt32() + ); + msg.setMetricsport(value); + break; + case 7: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setRemoteip(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Checkin.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStatus(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.Checkin.Status.serializeBinaryToWriter + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMetricsport(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getRemoteip(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); + }; + proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { + var f, obj = { + uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), + queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), + lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Checkin.Status(); + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setUptime(value); + break; + case 2: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setQueuedepth(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp(); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastHeartbeat(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUptime(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getQueuedepth(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getLastHeartbeat(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.Checkin.Status.prototype.getUptime = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); + }; + proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) + ); + }; + proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); + }; + proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) + ); + }; + proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { + return jspb.Message.setWrapperField(this, 3, value); + }; + proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { + return this.setLastHeartbeat(void 0); + }; + proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.Checkin.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Checkin.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Checkin.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Checkin.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Checkin.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Checkin.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Checkin.prototype.getStatus = function() { + return ( + /** @type{?proto.aggregator.Checkin.Status} */ + jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) + ); + }; + proto.aggregator.Checkin.prototype.setStatus = function(value) { + return jspb.Message.setWrapperField(this, 4, value); + }; + proto.aggregator.Checkin.prototype.clearStatus = function() { + return this.setStatus(void 0); + }; + proto.aggregator.Checkin.prototype.hasStatus = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.Checkin.prototype.getVersion = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 5, "") + ); + }; + proto.aggregator.Checkin.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); + }; + proto.aggregator.Checkin.prototype.getMetricsport = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 6, 0) + ); + }; + proto.aggregator.Checkin.prototype.setMetricsport = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); + }; + proto.aggregator.Checkin.prototype.getRemoteip = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 7, "") + ); + }; + proto.aggregator.Checkin.prototype.setRemoteip = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CheckinResp(); + return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp(); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CheckinResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) + ); + }; + proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(void 0); + }; + proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksReq(); + return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 4: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setMonotonicClock(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMonotonicClock(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + }; + proto.aggregator.SyncTasksReq.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.SyncTasksReq.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.SyncTasksReq.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.SyncTasksReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) + ); + }; + proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); + }; + proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { + var f, obj = { + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FixedEpochCondition(); + return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = ( + /** @type {!Array} */ + reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] + ); + for (var i = 0; i < values.length; i++) { + msg.addEpochs(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getEpochsList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f + ); + } + }; + proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) + ); + }; + proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { + return jspb.Message.setField(this, 1, value || []); + }; + proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); + }; + proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); + }; + proto.aggregator.CronCondition.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { + var f, obj = { + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CronCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CronCondition(); + return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.addSchedule(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CronCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getScheduleList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + }; + proto.aggregator.CronCondition.prototype.getScheduleList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) + ); + }; + proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { + return jspb.Message.setField(this, 1, value || []); + }; + proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); + }; + proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { + var f, obj = { + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.BlockCondition(); + return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setInterval(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.BlockCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + }; + proto.aggregator.BlockCondition.prototype.getInterval = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); + }; + proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.EventCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.EventCondition(); + return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.EventCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.EventCondition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.EventCondition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; + proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 + }; + proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { + return ( + /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0]) + ); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + var f, obj = { + manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskTrigger(); + return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {boolean} */ + reader.readBool() + ); + msg.setManual(value); + break; + case 2: + var value = new proto.aggregator.FixedEpochCondition(); + reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); + break; + case 3: + var value = new proto.aggregator.CronCondition(); + reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 4: + var value = new proto.aggregator.BlockCondition(); + reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 5: + var value = new proto.aggregator.EventCondition(); + reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = /** @type {boolean} */ + jspb.Message.getField(message, 1); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskTrigger.prototype.getManual = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; + proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 1) != null; + }; + proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { + return ( + /** @type{?proto.aggregator.FixedEpochCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) + ); + }; + proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; + }; + proto.aggregator.TaskTrigger.prototype.getCron = function() { + return ( + /** @type{?proto.aggregator.CronCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) + ); + }; + proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return ( + /** @type{?proto.aggregator.BlockCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) + ); + }; + proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return ( + /** @type{?proto.aggregator.EventCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) + ); + }; + proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 5) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksResp(); + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setChecktype(value); + break; + case 3: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getChecktype(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + }; + proto.aggregator.SyncTasksResp.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.SyncTasksResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) + ); + }; + proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 3, value); + }; + proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 3) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { + var f, obj = { + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ETHTransferNode(); + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setDestination(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAmount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getDestination(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getAmount(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.ETHTransferNode.prototype.getDestination = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ETHTransferNode.prototype.getAmount = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ContractWriteNode(); + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ContractWriteNode.prototype.getCallData = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ContractReadNode(); + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ContractReadNode.prototype.getCallData = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.GraphQLQueryNode(); + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setUrl(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + }; + proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 3, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); + }; + proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.RestAPINode(); + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setUrl(value); + break; + case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setBody(value); + break; + case 4: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMethod(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.RestAPINode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + }; + proto.aggregator.RestAPINode.prototype.getUrl = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 2, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this; + }; + proto.aggregator.RestAPINode.prototype.getBody = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.RestAPINode.prototype.getMethod = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CustomCodeNode(); + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {!proto.aggregator.CustomCodeType} */ + reader.readEnum() + ); + msg.setType(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getType(); + if (f !== 0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CustomCodeNode.prototype.getType = function() { + return ( + /** @type {!proto.aggregator.CustomCodeType} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.CustomCodeNode.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); + }; + proto.aggregator.CustomCodeNode.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); + }; + proto.aggregator.Condition.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Condition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Condition(); + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setType(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.Condition.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Condition.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Condition.prototype.getType = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Condition.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Condition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.BranchNode.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { + var f, obj = { + conditionsList: jspb.Message.toObjectList( + msg.getConditionsList(), + proto.aggregator.Condition.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.BranchNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.BranchNode(); + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.Condition(); + reader.readMessage(value, proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getConditionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Condition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) + ); + }; + proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); + }; + proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode(); + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.FilterNode.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode(); + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterVar(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setIterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.LoopNode.prototype.getIterVar = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.LoopNode.prototype.getIterKey = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.LoopNode.prototype.setIterKey = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge(); + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.TaskEdge.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.TaskEdge.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.TaskEdge.prototype.getTarget = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; + proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + LOOP: 17, + CUSTOM_CODE: 18 + }; + proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { + return ( + /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) + ); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.TaskNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskNode(); + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setName(value); + break; + case 10: + var value = new proto.aggregator.ETHTransferNode(); + reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); + msg.setEthTransfer(value); + break; + case 11: + var value = new proto.aggregator.ContractWriteNode(); + reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); + break; + case 12: + var value = new proto.aggregator.ContractReadNode(); + reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); + break; + case 13: + var value = new proto.aggregator.GraphQLQueryNode(); + reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); + break; + case 14: + var value = new proto.aggregator.RestAPINode(); + reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); + break; + case 15: + var value = new proto.aggregator.BranchNode(); + reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); + msg.setBranch(value); + break; + case 16: + var value = new proto.aggregator.FilterNode(); + reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.LoopNode(); + reader.readMessage(value, proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: + var value = new proto.aggregator.CustomCodeNode(); + reader.readMessage(value, proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEthTransfer(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.ETHTransferNode.serializeBinaryToWriter + ); + } + f = message.getContractWrite(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.aggregator.ContractWriteNode.serializeBinaryToWriter + ); + } + f = message.getContractRead(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.aggregator.ContractReadNode.serializeBinaryToWriter + ); + } + f = message.getGraphqlDataQuery(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter + ); + } + f = message.getRestApi(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.aggregator.RestAPINode.serializeBinaryToWriter + ); + } + f = message.getBranch(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getLoop(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskNode.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.TaskNode.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.TaskNode.prototype.getName = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.TaskNode.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.TaskNode.prototype.getEthTransfer = function() { + return ( + /** @type{?proto.aggregator.ETHTransferNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) + ); + }; + proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { + return this.setEthTransfer(void 0); + }; + proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; + }; + proto.aggregator.TaskNode.prototype.getContractWrite = function() { + return ( + /** @type{?proto.aggregator.ContractWriteNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) + ); + }; + proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(void 0); + }; + proto.aggregator.TaskNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; + }; + proto.aggregator.TaskNode.prototype.getContractRead = function() { + return ( + /** @type{?proto.aggregator.ContractReadNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) + ); + }; + proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(void 0); + }; + proto.aggregator.TaskNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; + }; + proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { + return ( + /** @type{?proto.aggregator.GraphQLQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) + ); + }; + proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(void 0); + }; + proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; + }; + proto.aggregator.TaskNode.prototype.getRestApi = function() { + return ( + /** @type{?proto.aggregator.RestAPINode} */ + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) + ); + }; + proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(void 0); + }; + proto.aggregator.TaskNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; + }; + proto.aggregator.TaskNode.prototype.getBranch = function() { + return ( + /** @type{?proto.aggregator.BranchNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) + ); + }; + proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearBranch = function() { + return this.setBranch(void 0); + }; + proto.aggregator.TaskNode.prototype.hasBranch = function() { + return jspb.Message.getField(this, 15) != null; + }; + proto.aggregator.TaskNode.prototype.getFilter = function() { + return ( + /** @type{?proto.aggregator.FilterNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) + ); + }; + proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(void 0); + }; + proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; + }; + proto.aggregator.TaskNode.prototype.getLoop = function() { + return ( + /** @type{?proto.aggregator.LoopNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(void 0); + }; + proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; + }; + proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return ( + /** @type{?proto.aggregator.CustomCodeNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) + ); + }; + proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(void 0); + }; + proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 18) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Execution.toObject(opt_includeInstance, this); + }; + proto.aggregator.Execution.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + error: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Execution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Execution(); + return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setEpoch(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setUserOpHash(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Execution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Execution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getEpoch(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getUserOpHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.Execution.prototype.getEpoch = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) + ); + }; + proto.aggregator.Execution.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); + }; + proto.aggregator.Execution.prototype.getUserOpHash = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Execution.prototype.setUserOpHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Execution.prototype.getError = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Execution.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Task.toObject(opt_includeInstance, this); + }; + proto.aggregator.Task.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), + status: jspb.Message.getFieldWithDefault(msg, 9, 0), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + nodesList: jspb.Message.toObjectList( + msg.getNodesList(), + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ), + executionsList: jspb.Message.toObjectList( + msg.getExecutionsList(), + proto.aggregator.Execution.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.Task.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Task(); + return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setOwner(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; + case 4: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setStartAt(value); + break; + case 5: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setExpiredAt(value); + break; + case 6: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMemo(value); + break; + case 7: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setCompletedAt(value); + break; + case 8: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setMaxExecution(value); + break; + case 9: + var value = ( + /** @type {!proto.aggregator.TaskStatus} */ + reader.readEnum() + ); + msg.setStatus(value); + break; + case 10: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 11: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 12: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: + var value = new proto.aggregator.Execution(); + reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); + msg.addExecutions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.Task.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Task.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCompletedAt(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getStatus(); + if (f !== 0) { + writer.writeEnum( + 9, + f + ); + } + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + f = message.getExecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, + proto.aggregator.Execution.serializeBinaryToWriter + ); + } + }; + proto.aggregator.Task.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Task.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Task.prototype.getOwner = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Task.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Task.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Task.prototype.getStartAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) + ); + }; + proto.aggregator.Task.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); + }; + proto.aggregator.Task.prototype.getExpiredAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 5, 0) + ); + }; + proto.aggregator.Task.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); + }; + proto.aggregator.Task.prototype.getMemo = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") + ); + }; + proto.aggregator.Task.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.Task.prototype.getCompletedAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 7, 0) + ); + }; + proto.aggregator.Task.prototype.setCompletedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); + }; + proto.aggregator.Task.prototype.getMaxExecution = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 8, 0) + ); + }; + proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); + }; + proto.aggregator.Task.prototype.getStatus = function() { + return ( + /** @type {!proto.aggregator.TaskStatus} */ + jspb.Message.getFieldWithDefault(this, 9, 0) + ); + }; + proto.aggregator.Task.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); + }; + proto.aggregator.Task.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) + ); + }; + proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 10, value); + }; + proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 10) != null; + }; + proto.aggregator.Task.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) + ); + }; + proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); + }; + proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.Task.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) + ); + }; + proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); + }; + proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); + }; + proto.aggregator.Task.prototype.getExecutionsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) + ); + }; + proto.aggregator.Task.prototype.setExecutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); + }; + proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); + }; + proto.aggregator.Task.prototype.clearExecutionsList = function() { + return this.setExecutionsList([]); + }; + proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { + var f, obj = { + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + nodesList: jspb.Message.toObjectList( + msg.getNodesList(), + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateTaskReq(); + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.TaskTrigger(); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 2: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setStartAt(value); + break; + case 3: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setExpiredAt(value); + break; + case 4: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setMaxExecution(value); + break; + case 5: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; + case 6: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + }; + proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { + return ( + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 1) != null; + }; + proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); + }; + proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 3, 0) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); + }; + proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 4, 0) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); + }; + proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 5, "") + ); + }; + proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); + }; + proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") + ); + }; + proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); + }; + proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); + }; + proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateTaskResp(); + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.CreateTaskResp.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateTaskResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); + }; + proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceRequest(); + return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.NonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.NonceRequest.prototype.getOwner = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.NonceRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { + var f, obj = { + nonce: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.NonceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceResp(); + return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setNonce(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.NonceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getNonce(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.NonceResp.prototype.getNonce = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.NonceResp.prototype.setNonce = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListWalletReq(); + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.ListWalletReq.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ListWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); + }; + proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SmartWallet(); + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.SmartWallet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.SmartWallet.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.SmartWallet.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.SmartWallet.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.ListWalletResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList( + msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListWalletResp(); + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet(); + reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } + }; + proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) + ); + }; + proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.ListWalletResp.prototype.addWallets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); + }; + proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListTasksReq(); + return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.ListTasksResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { + var f, obj = { + tasksList: jspb.Message.toObjectList( + msg.getTasksList(), + proto.aggregator.Task.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListTasksResp(); + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.Task(); + reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getTasksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); + } + }; + proto.aggregator.ListTasksResp.prototype.getTasksList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) + ); + }; + proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); + }; + proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { + return this.setTasksList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.GetKeyReq(); + return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setOwner(value); + break; + case 2: + var value = ( + /** @type {number} */ + reader.readInt64() + ); + msg.setExpiredAt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.GetKeyReq.prototype.getOwner = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) + ); + }; + proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); + }; + proto.aggregator.GetKeyReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { + var f, obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.KeyResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.KeyResp(); + return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.KeyResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getKey(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.KeyResp.prototype.getKey = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.KeyResp.prototype.setKey = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, ""), + idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksReq(); + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.addId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + }; + proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 3) + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); + }; + proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); + }; + proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksResp(); + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp(); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) + ); + }; + proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(void 0); + }; + proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletReq(); + return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CreateWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletResp(); + return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1e3, + STORAGEUNAVAILABLE: 2e3, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6e3, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7e3, + TASKDATAMISSINGERROR: 7001 + }; + proto.aggregator.TaskStatus = { + ACTIVE: 0, + COMPLETED: 1, + FAILED: 2, + CANCELED: 3, + EXECUTING: 4 + }; + proto.aggregator.CustomCodeType = { + JAVASCRIPT: 0 + }; + goog.object.extend(exports, proto.aggregator); + } +}); + +// grpc_codegen/avs_grpc_pb.js +var require_avs_grpc_pb = __commonJS({ + "grpc_codegen/avs_grpc_pb.js"(exports) { + "use strict"; + var grpc2 = __require("@grpc/grpc-js"); + var avs_pb3 = require_avs_pb(); + var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); + function serialize_aggregator_Checkin(arg) { + if (!(arg instanceof avs_pb3.Checkin)) { + throw new Error("Expected argument of type aggregator.Checkin"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Checkin(buffer_arg) { + return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CheckinResp(arg) { + if (!(arg instanceof avs_pb3.CheckinResp)) { + throw new Error("Expected argument of type aggregator.CheckinResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CheckinResp(buffer_arg) { + return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskReq(arg) { + if (!(arg instanceof avs_pb3.CreateTaskReq)) { + throw new Error("Expected argument of type aggregator.CreateTaskReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskReq(buffer_arg) { + return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskResp(arg) { + if (!(arg instanceof avs_pb3.CreateTaskResp)) { + throw new Error("Expected argument of type aggregator.CreateTaskResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskResp(buffer_arg) { + return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb3.CreateWalletReq)) { + throw new Error("Expected argument of type aggregator.CreateWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb3.CreateWalletResp)) { + throw new Error("Expected argument of type aggregator.CreateWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_GetKeyReq(arg) { + if (!(arg instanceof avs_pb3.GetKeyReq)) { + throw new Error("Expected argument of type aggregator.GetKeyReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_GetKeyReq(buffer_arg) { + return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb3.IdReq)) { + throw new Error("Expected argument of type aggregator.IdReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_KeyResp(arg) { + if (!(arg instanceof avs_pb3.KeyResp)) { + throw new Error("Expected argument of type aggregator.KeyResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_KeyResp(buffer_arg) { + return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksReq(arg) { + if (!(arg instanceof avs_pb3.ListTasksReq)) { + throw new Error("Expected argument of type aggregator.ListTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksReq(buffer_arg) { + return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksResp(arg) { + if (!(arg instanceof avs_pb3.ListTasksResp)) { + throw new Error("Expected argument of type aggregator.ListTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksResp(buffer_arg) { + return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb3.ListWalletReq)) { + throw new Error("Expected argument of type aggregator.ListWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb3.ListWalletResp)) { + throw new Error("Expected argument of type aggregator.ListWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceRequest(arg) { + if (!(arg instanceof avs_pb3.NonceRequest)) { + throw new Error("Expected argument of type aggregator.NonceRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceRequest(buffer_arg) { + return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceResp(arg) { + if (!(arg instanceof avs_pb3.NonceResp)) { + throw new Error("Expected argument of type aggregator.NonceResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceResp(buffer_arg) { + return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksReq(arg) { + if (!(arg instanceof avs_pb3.SyncTasksReq)) { + throw new Error("Expected argument of type aggregator.SyncTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksReq(buffer_arg) { + return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksResp(arg) { + if (!(arg instanceof avs_pb3.SyncTasksResp)) { + throw new Error("Expected argument of type aggregator.SyncTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksResp(buffer_arg) { + return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb3.Task)) { + throw new Error("Expected argument of type aggregator.Task"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Task(buffer_arg) { + return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksReq(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksReq)) { + throw new Error("Expected argument of type aggregator.UpdateChecksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksReq(buffer_arg) { + return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksResp(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksResp)) { + throw new Error("Expected argument of type aggregator.UpdateChecksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksResp(buffer_arg) { + return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_google_protobuf_BoolValue(arg) { + if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { + throw new Error("Expected argument of type google.protobuf.BoolValue"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_google_protobuf_BoolValue(buffer_arg) { + return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); + } + var AggregatorService = exports.AggregatorService = { + // Auth + getKey: { + path: "/aggregator.Aggregator/GetKey", + requestStream: false, + responseStream: false, + requestType: avs_pb3.GetKeyReq, + responseType: avs_pb3.KeyResp, + requestSerialize: serialize_aggregator_GetKeyReq, + requestDeserialize: deserialize_aggregator_GetKeyReq, + responseSerialize: serialize_aggregator_KeyResp, + responseDeserialize: deserialize_aggregator_KeyResp + }, + // Smart Acccount + getNonce: { + path: "/aggregator.Aggregator/GetNonce", + requestStream: false, + responseStream: false, + requestType: avs_pb3.NonceRequest, + responseType: avs_pb3.NonceResp, + requestSerialize: serialize_aggregator_NonceRequest, + requestDeserialize: deserialize_aggregator_NonceRequest, + responseSerialize: serialize_aggregator_NonceResp, + responseDeserialize: deserialize_aggregator_NonceResp + }, + createWallet: { + path: "/aggregator.Aggregator/CreateWallet", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateWalletReq, + responseType: avs_pb3.CreateWalletResp, + requestSerialize: serialize_aggregator_CreateWalletReq, + requestDeserialize: deserialize_aggregator_CreateWalletReq, + responseSerialize: serialize_aggregator_CreateWalletResp, + responseDeserialize: deserialize_aggregator_CreateWalletResp + }, + listWallets: { + path: "/aggregator.Aggregator/ListWallets", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListWalletReq, + responseType: avs_pb3.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp + }, + // Task Management + createTask: { + path: "/aggregator.Aggregator/CreateTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateTaskReq, + responseType: avs_pb3.CreateTaskResp, + requestSerialize: serialize_aggregator_CreateTaskReq, + requestDeserialize: deserialize_aggregator_CreateTaskReq, + responseSerialize: serialize_aggregator_CreateTaskResp, + responseDeserialize: deserialize_aggregator_CreateTaskResp + }, + listTasks: { + path: "/aggregator.Aggregator/ListTasks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListTasksReq, + responseType: avs_pb3.ListTasksResp, + requestSerialize: serialize_aggregator_ListTasksReq, + requestDeserialize: deserialize_aggregator_ListTasksReq, + responseSerialize: serialize_aggregator_ListTasksResp, + responseDeserialize: deserialize_aggregator_ListTasksResp + }, + getTask: { + path: "/aggregator.Aggregator/GetTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: avs_pb3.Task, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_aggregator_Task, + responseDeserialize: deserialize_aggregator_Task + }, + cancelTask: { + path: "/aggregator.Aggregator/CancelTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + deleteTask: { + path: "/aggregator.Aggregator/DeleteTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + // Operator endpoint + ping: { + path: "/aggregator.Aggregator/Ping", + requestStream: false, + responseStream: false, + requestType: avs_pb3.Checkin, + responseType: avs_pb3.CheckinResp, + requestSerialize: serialize_aggregator_Checkin, + requestDeserialize: deserialize_aggregator_Checkin, + responseSerialize: serialize_aggregator_CheckinResp, + responseDeserialize: deserialize_aggregator_CheckinResp + }, + syncTasks: { + path: "/aggregator.Aggregator/SyncTasks", + requestStream: false, + responseStream: true, + requestType: avs_pb3.SyncTasksReq, + responseType: avs_pb3.SyncTasksResp, + requestSerialize: serialize_aggregator_SyncTasksReq, + requestDeserialize: deserialize_aggregator_SyncTasksReq, + responseSerialize: serialize_aggregator_SyncTasksResp, + responseDeserialize: deserialize_aggregator_SyncTasksResp + }, + updateChecks: { + path: "/aggregator.Aggregator/UpdateChecks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.UpdateChecksReq, + responseType: avs_pb3.UpdateChecksResp, + requestSerialize: serialize_aggregator_UpdateChecksReq, + requestDeserialize: deserialize_aggregator_UpdateChecksReq, + responseSerialize: serialize_aggregator_UpdateChecksResp, + responseDeserialize: deserialize_aggregator_UpdateChecksResp + } + }; + exports.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); + } +}); + +// src/index.ts +import _ from "lodash"; +import * as grpc from "@grpc/grpc-js"; +import { Metadata } from "@grpc/grpc-js"; + +// src/auth.ts +var getKeyRequestMessage = (address, expiredAt) => { + return `key request for ${address} expired at ${expiredAt}`; +}; + +// src/index.ts +var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); +var avs_pb2 = __toESM(require_avs_pb()); + +// src/builder.ts +var avs_pb = __toESM(require_avs_pb()); +var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress2); + n.setCallData(callData); + if (contractABI) { + n.setContractAbi(contractABI); + } + return n; +}; +var buildContractRead = ({ contract_ddress, callData, contractABI }) => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + n.setContractAbi(n.contractABI); + } + return n; +}; +var buildGraphQL = ({ url, query, variables }) => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k, v] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); + } + return n; +}; +var buildRestAPI = ({ url, body, method, headers }) => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k, v] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); + } + return n; +}; +var buildBranch = ({ conditions }) => { + const n = new avs_pb.BranchNode(); + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + n.addConditions(condition); + } + return n; +}; +var buildFilter = ({ expression }) => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +}; +var buildTaskEdge = ({ id, source, target }) => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + return edge; +}; +var buildTaskNode = (node) => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode(); + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + return n; +}; +var buildTrigger = (payload) => { + const trigger = new avs_pb.TaskTrigger(); + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + return trigger; + } + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + trigger.setEvent(event); + return trigger; + } + throw new Error("missing trigger"); + } +}; +var triggerFromGRPC = (trigger) => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; + } + const base = { + triggerType: trigger.getTriggerTypeCase() + }; + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() }; + break; + } + return base; +}; +var nodeFromGRPC = (node) => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + }; + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = { + conditions: base.branch.conditionsList + }; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; + } + return standarize; +}; +var taskEdgeFromGRPC = (edge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget() + }; +}; + +// src/task.ts +var Task = class { + constructor(task) { + this.id = task.getId() || ""; + this.status = task.getStatus(); + this.owner = task.getOwner(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); + this.startAt = task.getStartAt(); + this.expiredAt = task.getExpiredAt(); + this.memo = task.getMemo(); + this.completedAt = task.getCompletedAt(); + this.status = task.getStatus(); + this.executions = task.getExecutionsList().map((execution) => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError() + }; + }); + this.maxExecution = task.getMaxExecution(); + } +}; +var task_default = Task; + +// src/types.ts +var AUTH_KEY_HEADER = "authkey"; + +// src/index.ts +var BaseClient = class { + constructor(opts) { + this.endpoint = opts.endpoint; + this.rpcClient = new import_avs_grpc_pb.AggregatorClient( + this.endpoint, + grpc.credentials.createInsecure() + ); + this.metadata = new Metadata(); + } + isAuthKeyValid(key) { + try { + const [, payload] = key.split("."); + const decodedPayload = JSON.parse(atob(payload)); + const currentTimestamp = Math.floor(Date.now() / 1e3); + return decodedPayload.exp > currentTimestamp; + } catch (error) { + console.error("Error validating auth key:", error); + return false; + } + } + // When using the APIkey, depends on scope of the key, it may have access to one ore more account + async authWithAPIKey(address, apiKey, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); + request.setExpiredAt(expiredAtEpoch); + request.setSignature(apiKey); + const result = await this._callAnonRPC("getKey", request); + return { authKey: result.getKey() }; + } + // This flow can be used where the signature is generate from outside, such as in front-end and pass in + async authWithSignature(address, signature, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); + request.setExpiredAt(expiredAtEpoch); + request.setSignature(signature); + let result = await this._callAnonRPC( + "getKey", + request + ); + return { authKey: result.getKey() }; + } + _callRPC(method, request, options) { + const metadata = _.cloneDeep(this.metadata); + if (!options?.authKey) { + throw new Error("missing auth header"); + } + metadata.set(AUTH_KEY_HEADER, options.authKey); + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } + _callAnonRPC(method, request, options) { + const metadata = _.cloneDeep(this.metadata); + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } +}; +var Client = class extends BaseClient { + constructor(config) { + super(config); + } + async listSmartWallets(options) { + const request = new avs_pb2.ListWalletReq(); + const result = await this._callRPC("listWallets", request, options); + return result.getWalletsList().map((item) => item.toObject()); + } + async createWallet({ + salt, + factoryAddress + }, options) { + const request = new avs_pb2.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + const result = await this._callRPC("createWallet", request, options); + return { + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress() + }; + } + async createTask(payload, options) { + const request = new avs_pb2.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + request.setTrigger(buildTrigger(payload.trigger)); + for (const node of payload.nodes) { + request.addNodes(buildTaskNode(node)); + } + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + const result = await this._callRPC("createTask", request, options); + return result.getId(); + } + async listTasks(address, options) { + const request = new avs_pb2.ListTasksReq(); + request.setSmartWalletAddress(address); + const result = await this._callRPC("listTasks", request, options); + return result.getTasksList().map((item) => new task_default(item)); + } + // TODO: specify the return type to match client’s requirements + async getTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); + const result = await this._callRPC( + "getTask", + request, + options + ); + return new task_default(result); + } + async cancelTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); + const result = await this._callRPC( + "cancelTask", + request, + options + ); + return result.getValue(); + } + async deleteTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); + const result = await this._callRPC( + "deleteTask", + request, + options + ); + return result.getValue(); + } +}; +export { + AUTH_KEY_HEADER, + Client as default, + getKeyRequestMessage +}; diff --git a/grpc_codegen/compiled.d.ts b/grpc_codegen/compiled.d.ts deleted file mode 100644 index 1f915ba..0000000 --- a/grpc_codegen/compiled.d.ts +++ /dev/null @@ -1,5536 +0,0 @@ -import * as $protobuf from "protobufjs"; -import Long = require("long"); -/** Namespace aggregator. */ -export namespace aggregator { - - /** Properties of a UUID. */ - interface IUUID { - - /** UUID bytes */ - bytes?: (string|null); - } - - /** Represents a UUID. */ - class UUID implements IUUID { - - /** - * Constructs a new UUID. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IUUID); - - /** UUID bytes. */ - public bytes: string; - - /** - * Creates a new UUID instance using the specified properties. - * @param [properties] Properties to set - * @returns UUID instance - */ - public static create(properties?: aggregator.IUUID): aggregator.UUID; - - /** - * Encodes the specified UUID message. Does not implicitly {@link aggregator.UUID.verify|verify} messages. - * @param message UUID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IUUID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UUID message, length delimited. Does not implicitly {@link aggregator.UUID.verify|verify} messages. - * @param message UUID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IUUID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UUID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UUID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.UUID; - - /** - * Decodes a UUID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UUID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.UUID; - - /** - * Verifies a UUID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UUID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UUID - */ - public static fromObject(object: { [k: string]: any }): aggregator.UUID; - - /** - * Creates a plain object from a UUID message. Also converts values to other types if specified. - * @param message UUID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.UUID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UUID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UUID - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Checkin. */ - interface ICheckin { - - /** Checkin id */ - id?: (string|null); - - /** Checkin address */ - address?: (string|null); - - /** Checkin signature */ - signature?: (string|null); - - /** Checkin status */ - status?: (aggregator.Checkin.IStatus|null); - - /** Checkin version */ - version?: (string|null); - - /** Checkin metricsPort */ - metricsPort?: (number|null); - - /** Checkin remoteIP */ - remoteIP?: (string|null); - } - - /** Represents a Checkin. */ - class Checkin implements ICheckin { - - /** - * Constructs a new Checkin. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICheckin); - - /** Checkin id. */ - public id: string; - - /** Checkin address. */ - public address: string; - - /** Checkin signature. */ - public signature: string; - - /** Checkin status. */ - public status?: (aggregator.Checkin.IStatus|null); - - /** Checkin version. */ - public version: string; - - /** Checkin metricsPort. */ - public metricsPort: number; - - /** Checkin remoteIP. */ - public remoteIP: string; - - /** - * Creates a new Checkin instance using the specified properties. - * @param [properties] Properties to set - * @returns Checkin instance - */ - public static create(properties?: aggregator.ICheckin): aggregator.Checkin; - - /** - * Encodes the specified Checkin message. Does not implicitly {@link aggregator.Checkin.verify|verify} messages. - * @param message Checkin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICheckin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Checkin message, length delimited. Does not implicitly {@link aggregator.Checkin.verify|verify} messages. - * @param message Checkin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICheckin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Checkin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Checkin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Checkin; - - /** - * Decodes a Checkin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Checkin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Checkin; - - /** - * Verifies a Checkin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Checkin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Checkin - */ - public static fromObject(object: { [k: string]: any }): aggregator.Checkin; - - /** - * Creates a plain object from a Checkin message. Also converts values to other types if specified. - * @param message Checkin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.Checkin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Checkin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Checkin - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Checkin { - - /** Properties of a Status. */ - interface IStatus { - - /** Status uptime */ - uptime?: (number|Long|null); - - /** Status queueDepth */ - queueDepth?: (number|Long|null); - - /** Status lastHeartbeat */ - lastHeartbeat?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.Checkin.IStatus); - - /** Status uptime. */ - public uptime: (number|Long); - - /** Status queueDepth. */ - public queueDepth: (number|Long); - - /** Status lastHeartbeat. */ - public lastHeartbeat?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Status instance using the specified properties. - * @param [properties] Properties to set - * @returns Status instance - */ - public static create(properties?: aggregator.Checkin.IStatus): aggregator.Checkin.Status; - - /** - * Encodes the specified Status message. Does not implicitly {@link aggregator.Checkin.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.Checkin.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Status message, length delimited. Does not implicitly {@link aggregator.Checkin.Status.verify|verify} messages. - * @param message Status message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.Checkin.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Status message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Checkin.Status; - - /** - * Decodes a Status message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Status - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Checkin.Status; - - /** - * Verifies a Status message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): aggregator.Checkin.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.Checkin.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Status to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Status - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CheckinResp. */ - interface ICheckinResp { - - /** CheckinResp updatedAt */ - updatedAt?: (google.protobuf.ITimestamp|null); - } - - /** Represents a CheckinResp. */ - class CheckinResp implements ICheckinResp { - - /** - * Constructs a new CheckinResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICheckinResp); - - /** CheckinResp updatedAt. */ - public updatedAt?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new CheckinResp instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckinResp instance - */ - public static create(properties?: aggregator.ICheckinResp): aggregator.CheckinResp; - - /** - * Encodes the specified CheckinResp message. Does not implicitly {@link aggregator.CheckinResp.verify|verify} messages. - * @param message CheckinResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICheckinResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckinResp message, length delimited. Does not implicitly {@link aggregator.CheckinResp.verify|verify} messages. - * @param message CheckinResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICheckinResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckinResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckinResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CheckinResp; - - /** - * Decodes a CheckinResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckinResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CheckinResp; - - /** - * Verifies a CheckinResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckinResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckinResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.CheckinResp; - - /** - * Creates a plain object from a CheckinResp message. Also converts values to other types if specified. - * @param message CheckinResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CheckinResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckinResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckinResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SyncTasksReq. */ - interface ISyncTasksReq { - - /** SyncTasksReq id */ - id?: (string|null); - - /** SyncTasksReq address */ - address?: (string|null); - - /** SyncTasksReq signature */ - signature?: (string|null); - - /** SyncTasksReq monotonicClock */ - monotonicClock?: (number|Long|null); - } - - /** Represents a SyncTasksReq. */ - class SyncTasksReq implements ISyncTasksReq { - - /** - * Constructs a new SyncTasksReq. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ISyncTasksReq); - - /** SyncTasksReq id. */ - public id: string; - - /** SyncTasksReq address. */ - public address: string; - - /** SyncTasksReq signature. */ - public signature: string; - - /** SyncTasksReq monotonicClock. */ - public monotonicClock: (number|Long); - - /** - * Creates a new SyncTasksReq instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncTasksReq instance - */ - public static create(properties?: aggregator.ISyncTasksReq): aggregator.SyncTasksReq; - - /** - * Encodes the specified SyncTasksReq message. Does not implicitly {@link aggregator.SyncTasksReq.verify|verify} messages. - * @param message SyncTasksReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ISyncTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncTasksReq message, length delimited. Does not implicitly {@link aggregator.SyncTasksReq.verify|verify} messages. - * @param message SyncTasksReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ISyncTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncTasksReq message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncTasksReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.SyncTasksReq; - - /** - * Decodes a SyncTasksReq message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncTasksReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.SyncTasksReq; - - /** - * Verifies a SyncTasksReq message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SyncTasksReq message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncTasksReq - */ - public static fromObject(object: { [k: string]: any }): aggregator.SyncTasksReq; - - /** - * Creates a plain object from a SyncTasksReq message. Also converts values to other types if specified. - * @param message SyncTasksReq - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.SyncTasksReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncTasksReq to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SyncTasksReq - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** TriggerType enum. */ - enum TriggerType { - ManualTrigger = 0, - FixedEpochTrigger = 1, - CronTrigger = 2, - BlockTrigger = 3, - EventTrigger = 4 - } - - /** Properties of a FixedEpochCondition. */ - interface IFixedEpochCondition { - - /** FixedEpochCondition epoches */ - epoches?: ((number|Long)[]|null); - } - - /** Represents a FixedEpochCondition. */ - class FixedEpochCondition implements IFixedEpochCondition { - - /** - * Constructs a new FixedEpochCondition. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IFixedEpochCondition); - - /** FixedEpochCondition epoches. */ - public epoches: (number|Long)[]; - - /** - * Creates a new FixedEpochCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns FixedEpochCondition instance - */ - public static create(properties?: aggregator.IFixedEpochCondition): aggregator.FixedEpochCondition; - - /** - * Encodes the specified FixedEpochCondition message. Does not implicitly {@link aggregator.FixedEpochCondition.verify|verify} messages. - * @param message FixedEpochCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IFixedEpochCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FixedEpochCondition message, length delimited. Does not implicitly {@link aggregator.FixedEpochCondition.verify|verify} messages. - * @param message FixedEpochCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IFixedEpochCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FixedEpochCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FixedEpochCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.FixedEpochCondition; - - /** - * Decodes a FixedEpochCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FixedEpochCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.FixedEpochCondition; - - /** - * Verifies a FixedEpochCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FixedEpochCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FixedEpochCondition - */ - public static fromObject(object: { [k: string]: any }): aggregator.FixedEpochCondition; - - /** - * Creates a plain object from a FixedEpochCondition message. Also converts values to other types if specified. - * @param message FixedEpochCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.FixedEpochCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FixedEpochCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FixedEpochCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CronCondition. */ - interface ICronCondition { - - /** CronCondition cronTable */ - cronTable?: (string[]|null); - } - - /** Represents a CronCondition. */ - class CronCondition implements ICronCondition { - - /** - * Constructs a new CronCondition. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICronCondition); - - /** CronCondition cronTable. */ - public cronTable: string[]; - - /** - * Creates a new CronCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns CronCondition instance - */ - public static create(properties?: aggregator.ICronCondition): aggregator.CronCondition; - - /** - * Encodes the specified CronCondition message. Does not implicitly {@link aggregator.CronCondition.verify|verify} messages. - * @param message CronCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICronCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CronCondition message, length delimited. Does not implicitly {@link aggregator.CronCondition.verify|verify} messages. - * @param message CronCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICronCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CronCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CronCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CronCondition; - - /** - * Decodes a CronCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CronCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CronCondition; - - /** - * Verifies a CronCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CronCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CronCondition - */ - public static fromObject(object: { [k: string]: any }): aggregator.CronCondition; - - /** - * Creates a plain object from a CronCondition message. Also converts values to other types if specified. - * @param message CronCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CronCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CronCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CronCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BlockCondition. */ - interface IBlockCondition { - - /** BlockCondition interval */ - interval?: (number|Long|null); - } - - /** Represents a BlockCondition. */ - class BlockCondition implements IBlockCondition { - - /** - * Constructs a new BlockCondition. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IBlockCondition); - - /** BlockCondition interval. */ - public interval: (number|Long); - - /** - * Creates a new BlockCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns BlockCondition instance - */ - public static create(properties?: aggregator.IBlockCondition): aggregator.BlockCondition; - - /** - * Encodes the specified BlockCondition message. Does not implicitly {@link aggregator.BlockCondition.verify|verify} messages. - * @param message BlockCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IBlockCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockCondition message, length delimited. Does not implicitly {@link aggregator.BlockCondition.verify|verify} messages. - * @param message BlockCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IBlockCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlockCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlockCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.BlockCondition; - - /** - * Decodes a BlockCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlockCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.BlockCondition; - - /** - * Verifies a BlockCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlockCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockCondition - */ - public static fromObject(object: { [k: string]: any }): aggregator.BlockCondition; - - /** - * Creates a plain object from a BlockCondition message. Also converts values to other types if specified. - * @param message BlockCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.BlockCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BlockCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EventCondition. */ - interface IEventCondition { - - /** EventCondition expression */ - expression?: (string|null); - } - - /** Represents an EventCondition. */ - class EventCondition implements IEventCondition { - - /** - * Constructs a new EventCondition. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IEventCondition); - - /** EventCondition expression. */ - public expression: string; - - /** - * Creates a new EventCondition instance using the specified properties. - * @param [properties] Properties to set - * @returns EventCondition instance - */ - public static create(properties?: aggregator.IEventCondition): aggregator.EventCondition; - - /** - * Encodes the specified EventCondition message. Does not implicitly {@link aggregator.EventCondition.verify|verify} messages. - * @param message EventCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IEventCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventCondition message, length delimited. Does not implicitly {@link aggregator.EventCondition.verify|verify} messages. - * @param message EventCondition message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IEventCondition, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventCondition message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.EventCondition; - - /** - * Decodes an EventCondition message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.EventCondition; - - /** - * Verifies an EventCondition message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EventCondition message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventCondition - */ - public static fromObject(object: { [k: string]: any }): aggregator.EventCondition; - - /** - * Creates a plain object from an EventCondition message. Also converts values to other types if specified. - * @param message EventCondition - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.EventCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventCondition to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EventCondition - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskTrigger. */ - interface ITaskTrigger { - - /** TaskTrigger triggerType */ - triggerType?: (aggregator.TriggerType|null); - - /** TaskTrigger manual */ - manual?: (boolean|null); - - /** TaskTrigger at */ - at?: (aggregator.IFixedEpochCondition|null); - - /** TaskTrigger cron */ - cron?: (aggregator.ICronCondition|null); - - /** TaskTrigger block */ - block?: (aggregator.IBlockCondition|null); - - /** TaskTrigger event */ - event?: (aggregator.IEventCondition|null); - } - - /** Represents a TaskTrigger. */ - class TaskTrigger implements ITaskTrigger { - - /** - * Constructs a new TaskTrigger. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ITaskTrigger); - - /** TaskTrigger triggerType. */ - public triggerType: aggregator.TriggerType; - - /** TaskTrigger manual. */ - public manual?: (boolean|null); - - /** TaskTrigger at. */ - public at?: (aggregator.IFixedEpochCondition|null); - - /** TaskTrigger cron. */ - public cron?: (aggregator.ICronCondition|null); - - /** TaskTrigger block. */ - public block?: (aggregator.IBlockCondition|null); - - /** TaskTrigger event. */ - public event?: (aggregator.IEventCondition|null); - - /** TaskTrigger triggerCondition. */ - public triggerCondition?: ("manual"|"at"|"cron"|"block"|"event"); - - /** - * Creates a new TaskTrigger instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskTrigger instance - */ - public static create(properties?: aggregator.ITaskTrigger): aggregator.TaskTrigger; - - /** - * Encodes the specified TaskTrigger message. Does not implicitly {@link aggregator.TaskTrigger.verify|verify} messages. - * @param message TaskTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ITaskTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskTrigger message, length delimited. Does not implicitly {@link aggregator.TaskTrigger.verify|verify} messages. - * @param message TaskTrigger message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ITaskTrigger, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskTrigger message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.TaskTrigger; - - /** - * Decodes a TaskTrigger message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskTrigger - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.TaskTrigger; - - /** - * Verifies a TaskTrigger message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TaskTrigger message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskTrigger - */ - public static fromObject(object: { [k: string]: any }): aggregator.TaskTrigger; - - /** - * Creates a plain object from a TaskTrigger message. Also converts values to other types if specified. - * @param message TaskTrigger - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.TaskTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskTrigger to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskTrigger - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Error enum. */ - enum Error { - UnknowError = 0, - RpcNodeError = 1000, - StorageUnavailable = 2000, - StorageWriteError = 2001, - SmartWalletRpcError = 6000, - SmartWalletNotFoundError = 6001, - TaskDataCorrupted = 7000, - TaskDataMissingError = 7001 - } - - /** Properties of a SyncTasksResp. */ - interface ISyncTasksResp { - - /** SyncTasksResp id */ - id?: (string|null); - - /** SyncTasksResp checkType */ - checkType?: (string|null); - - /** SyncTasksResp trigger */ - trigger?: (aggregator.ITaskTrigger|null); - } - - /** Represents a SyncTasksResp. */ - class SyncTasksResp implements ISyncTasksResp { - - /** - * Constructs a new SyncTasksResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ISyncTasksResp); - - /** SyncTasksResp id. */ - public id: string; - - /** SyncTasksResp checkType. */ - public checkType: string; - - /** SyncTasksResp trigger. */ - public trigger?: (aggregator.ITaskTrigger|null); - - /** - * Creates a new SyncTasksResp instance using the specified properties. - * @param [properties] Properties to set - * @returns SyncTasksResp instance - */ - public static create(properties?: aggregator.ISyncTasksResp): aggregator.SyncTasksResp; - - /** - * Encodes the specified SyncTasksResp message. Does not implicitly {@link aggregator.SyncTasksResp.verify|verify} messages. - * @param message SyncTasksResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ISyncTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SyncTasksResp message, length delimited. Does not implicitly {@link aggregator.SyncTasksResp.verify|verify} messages. - * @param message SyncTasksResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ISyncTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SyncTasksResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SyncTasksResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.SyncTasksResp; - - /** - * Decodes a SyncTasksResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SyncTasksResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.SyncTasksResp; - - /** - * Verifies a SyncTasksResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SyncTasksResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SyncTasksResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.SyncTasksResp; - - /** - * Creates a plain object from a SyncTasksResp message. Also converts values to other types if specified. - * @param message SyncTasksResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.SyncTasksResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SyncTasksResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SyncTasksResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** TaskStatus enum. */ - enum TaskStatus { - Active = 0, - Completed = 1, - Failed = 2, - Canceled = 3, - Executing = 4 - } - - /** Properties of a ETHTransferNode. */ - interface IETHTransferNode { - - /** ETHTransferNode destination */ - destination?: (string|null); - - /** ETHTransferNode amount */ - amount?: (string|null); - } - - /** Represents a ETHTransferNode. */ - class ETHTransferNode implements IETHTransferNode { - - /** - * Constructs a new ETHTransferNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IETHTransferNode); - - /** ETHTransferNode destination. */ - public destination: string; - - /** ETHTransferNode amount. */ - public amount: string; - - /** - * Creates a new ETHTransferNode instance using the specified properties. - * @param [properties] Properties to set - * @returns ETHTransferNode instance - */ - public static create(properties?: aggregator.IETHTransferNode): aggregator.ETHTransferNode; - - /** - * Encodes the specified ETHTransferNode message. Does not implicitly {@link aggregator.ETHTransferNode.verify|verify} messages. - * @param message ETHTransferNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IETHTransferNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ETHTransferNode message, length delimited. Does not implicitly {@link aggregator.ETHTransferNode.verify|verify} messages. - * @param message ETHTransferNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IETHTransferNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ETHTransferNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ETHTransferNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ETHTransferNode; - - /** - * Decodes a ETHTransferNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ETHTransferNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ETHTransferNode; - - /** - * Verifies a ETHTransferNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ETHTransferNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ETHTransferNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.ETHTransferNode; - - /** - * Creates a plain object from a ETHTransferNode message. Also converts values to other types if specified. - * @param message ETHTransferNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.ETHTransferNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ETHTransferNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ETHTransferNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContractWriteNode. */ - interface IContractWriteNode { - - /** ContractWriteNode contractAddress */ - contractAddress?: (string|null); - - /** ContractWriteNode callData */ - callData?: (string|null); - - /** ContractWriteNode contractAbi */ - contractAbi?: (string|null); - } - - /** Represents a ContractWriteNode. */ - class ContractWriteNode implements IContractWriteNode { - - /** - * Constructs a new ContractWriteNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IContractWriteNode); - - /** ContractWriteNode contractAddress. */ - public contractAddress: string; - - /** ContractWriteNode callData. */ - public callData: string; - - /** ContractWriteNode contractAbi. */ - public contractAbi: string; - - /** - * Creates a new ContractWriteNode instance using the specified properties. - * @param [properties] Properties to set - * @returns ContractWriteNode instance - */ - public static create(properties?: aggregator.IContractWriteNode): aggregator.ContractWriteNode; - - /** - * Encodes the specified ContractWriteNode message. Does not implicitly {@link aggregator.ContractWriteNode.verify|verify} messages. - * @param message ContractWriteNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IContractWriteNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContractWriteNode message, length delimited. Does not implicitly {@link aggregator.ContractWriteNode.verify|verify} messages. - * @param message ContractWriteNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IContractWriteNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContractWriteNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContractWriteNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ContractWriteNode; - - /** - * Decodes a ContractWriteNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContractWriteNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ContractWriteNode; - - /** - * Verifies a ContractWriteNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContractWriteNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContractWriteNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.ContractWriteNode; - - /** - * Creates a plain object from a ContractWriteNode message. Also converts values to other types if specified. - * @param message ContractWriteNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.ContractWriteNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContractWriteNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContractWriteNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ContractQueryNode. */ - interface IContractQueryNode { - - /** ContractQueryNode contractAddress */ - contractAddress?: (string|null); - - /** ContractQueryNode callData */ - callData?: (string|null); - - /** ContractQueryNode contractAbi */ - contractAbi?: (string|null); - } - - /** Represents a ContractQueryNode. */ - class ContractQueryNode implements IContractQueryNode { - - /** - * Constructs a new ContractQueryNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IContractQueryNode); - - /** ContractQueryNode contractAddress. */ - public contractAddress: string; - - /** ContractQueryNode callData. */ - public callData: string; - - /** ContractQueryNode contractAbi. */ - public contractAbi: string; - - /** - * Creates a new ContractQueryNode instance using the specified properties. - * @param [properties] Properties to set - * @returns ContractQueryNode instance - */ - public static create(properties?: aggregator.IContractQueryNode): aggregator.ContractQueryNode; - - /** - * Encodes the specified ContractQueryNode message. Does not implicitly {@link aggregator.ContractQueryNode.verify|verify} messages. - * @param message ContractQueryNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IContractQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContractQueryNode message, length delimited. Does not implicitly {@link aggregator.ContractQueryNode.verify|verify} messages. - * @param message ContractQueryNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IContractQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContractQueryNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContractQueryNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ContractQueryNode; - - /** - * Decodes a ContractQueryNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContractQueryNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ContractQueryNode; - - /** - * Verifies a ContractQueryNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContractQueryNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContractQueryNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.ContractQueryNode; - - /** - * Creates a plain object from a ContractQueryNode message. Also converts values to other types if specified. - * @param message ContractQueryNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.ContractQueryNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContractQueryNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ContractQueryNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GraphQLQueryNode. */ - interface IGraphQLQueryNode { - - /** GraphQLQueryNode url */ - url?: (string|null); - - /** GraphQLQueryNode query */ - query?: (string|null); - } - - /** Represents a GraphQLQueryNode. */ - class GraphQLQueryNode implements IGraphQLQueryNode { - - /** - * Constructs a new GraphQLQueryNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IGraphQLQueryNode); - - /** GraphQLQueryNode url. */ - public url: string; - - /** GraphQLQueryNode query. */ - public query: string; - - /** - * Creates a new GraphQLQueryNode instance using the specified properties. - * @param [properties] Properties to set - * @returns GraphQLQueryNode instance - */ - public static create(properties?: aggregator.IGraphQLQueryNode): aggregator.GraphQLQueryNode; - - /** - * Encodes the specified GraphQLQueryNode message. Does not implicitly {@link aggregator.GraphQLQueryNode.verify|verify} messages. - * @param message GraphQLQueryNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IGraphQLQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GraphQLQueryNode message, length delimited. Does not implicitly {@link aggregator.GraphQLQueryNode.verify|verify} messages. - * @param message GraphQLQueryNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IGraphQLQueryNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GraphQLQueryNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GraphQLQueryNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.GraphQLQueryNode; - - /** - * Decodes a GraphQLQueryNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GraphQLQueryNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.GraphQLQueryNode; - - /** - * Verifies a GraphQLQueryNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GraphQLQueryNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GraphQLQueryNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.GraphQLQueryNode; - - /** - * Creates a plain object from a GraphQLQueryNode message. Also converts values to other types if specified. - * @param message GraphQLQueryNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.GraphQLQueryNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GraphQLQueryNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GraphQLQueryNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestAPINode. */ - interface IRestAPINode { - - /** RestAPINode url */ - url?: (string|null); - - /** RestAPINode headers */ - headers?: ({ [k: string]: string }|null); - - /** RestAPINode body */ - body?: (string|null); - - /** RestAPINode method */ - method?: (string|null); - } - - /** Represents a RestAPINode. */ - class RestAPINode implements IRestAPINode { - - /** - * Constructs a new RestAPINode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IRestAPINode); - - /** RestAPINode url. */ - public url: string; - - /** RestAPINode headers. */ - public headers: { [k: string]: string }; - - /** RestAPINode body. */ - public body: string; - - /** RestAPINode method. */ - public method: string; - - /** - * Creates a new RestAPINode instance using the specified properties. - * @param [properties] Properties to set - * @returns RestAPINode instance - */ - public static create(properties?: aggregator.IRestAPINode): aggregator.RestAPINode; - - /** - * Encodes the specified RestAPINode message. Does not implicitly {@link aggregator.RestAPINode.verify|verify} messages. - * @param message RestAPINode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IRestAPINode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestAPINode message, length delimited. Does not implicitly {@link aggregator.RestAPINode.verify|verify} messages. - * @param message RestAPINode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IRestAPINode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestAPINode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestAPINode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.RestAPINode; - - /** - * Decodes a RestAPINode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestAPINode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.RestAPINode; - - /** - * Verifies a RestAPINode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestAPINode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestAPINode - */ - public static fromObject(object: { [k: string]: any }): aggregator.RestAPINode; - - /** - * Creates a plain object from a RestAPINode message. Also converts values to other types if specified. - * @param message RestAPINode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.RestAPINode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestAPINode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestAPINode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** CustomCodeType enum. */ - enum CustomCodeType { - JavaScript = 0 - } - - /** Properties of a CustomCodeNode. */ - interface ICustomCodeNode { - - /** CustomCodeNode type */ - type?: (aggregator.CustomCodeType|null); - - /** CustomCodeNode source */ - source?: (string|null); - } - - /** Represents a CustomCodeNode. */ - class CustomCodeNode implements ICustomCodeNode { - - /** - * Constructs a new CustomCodeNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICustomCodeNode); - - /** CustomCodeNode type. */ - public type: aggregator.CustomCodeType; - - /** CustomCodeNode source. */ - public source: string; - - /** - * Creates a new CustomCodeNode instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomCodeNode instance - */ - public static create(properties?: aggregator.ICustomCodeNode): aggregator.CustomCodeNode; - - /** - * Encodes the specified CustomCodeNode message. Does not implicitly {@link aggregator.CustomCodeNode.verify|verify} messages. - * @param message CustomCodeNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICustomCodeNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomCodeNode message, length delimited. Does not implicitly {@link aggregator.CustomCodeNode.verify|verify} messages. - * @param message CustomCodeNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICustomCodeNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomCodeNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomCodeNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CustomCodeNode; - - /** - * Decodes a CustomCodeNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomCodeNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CustomCodeNode; - - /** - * Verifies a CustomCodeNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomCodeNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomCodeNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.CustomCodeNode; - - /** - * Creates a plain object from a CustomCodeNode message. Also converts values to other types if specified. - * @param message CustomCodeNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CustomCodeNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomCodeNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomCodeNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConditionJump. */ - interface IConditionJump { - - /** ConditionJump expression */ - expression?: (string|null); - - /** ConditionJump next */ - next?: (string|null); - } - - /** Represents a ConditionJump. */ - class ConditionJump implements IConditionJump { - - /** - * Constructs a new ConditionJump. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IConditionJump); - - /** ConditionJump expression. */ - public expression: string; - - /** ConditionJump next. */ - public next: string; - - /** - * Creates a new ConditionJump instance using the specified properties. - * @param [properties] Properties to set - * @returns ConditionJump instance - */ - public static create(properties?: aggregator.IConditionJump): aggregator.ConditionJump; - - /** - * Encodes the specified ConditionJump message. Does not implicitly {@link aggregator.ConditionJump.verify|verify} messages. - * @param message ConditionJump message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IConditionJump, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConditionJump message, length delimited. Does not implicitly {@link aggregator.ConditionJump.verify|verify} messages. - * @param message ConditionJump message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IConditionJump, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConditionJump message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConditionJump - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ConditionJump; - - /** - * Decodes a ConditionJump message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConditionJump - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ConditionJump; - - /** - * Verifies a ConditionJump message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConditionJump message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConditionJump - */ - public static fromObject(object: { [k: string]: any }): aggregator.ConditionJump; - - /** - * Creates a plain object from a ConditionJump message. Also converts values to other types if specified. - * @param message ConditionJump - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.ConditionJump, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConditionJump to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConditionJump - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BranchNode. */ - interface IBranchNode { - - /** BranchNode if */ - "if"?: (aggregator.IConditionJump|null); - - /** BranchNode elseIfs */ - elseIfs?: (aggregator.IConditionJump[]|null); - - /** BranchNode else */ - "else"?: (aggregator.IConditionJump|null); - } - - /** Represents a BranchNode. */ - class BranchNode implements IBranchNode { - - /** - * Constructs a new BranchNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IBranchNode); - - /** BranchNode if. */ - public if?: (aggregator.IConditionJump|null); - - /** BranchNode elseIfs. */ - public elseIfs: aggregator.IConditionJump[]; - - /** BranchNode else. */ - public else?: (aggregator.IConditionJump|null); - - /** - * Creates a new BranchNode instance using the specified properties. - * @param [properties] Properties to set - * @returns BranchNode instance - */ - public static create(properties?: aggregator.IBranchNode): aggregator.BranchNode; - - /** - * Encodes the specified BranchNode message. Does not implicitly {@link aggregator.BranchNode.verify|verify} messages. - * @param message BranchNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IBranchNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BranchNode message, length delimited. Does not implicitly {@link aggregator.BranchNode.verify|verify} messages. - * @param message BranchNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IBranchNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BranchNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BranchNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.BranchNode; - - /** - * Decodes a BranchNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BranchNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.BranchNode; - - /** - * Verifies a BranchNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BranchNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BranchNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.BranchNode; - - /** - * Creates a plain object from a BranchNode message. Also converts values to other types if specified. - * @param message BranchNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.BranchNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BranchNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BranchNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FilterNode. */ - interface IFilterNode { - - /** FilterNode expression */ - expression?: (string|null); - } - - /** Represents a FilterNode. */ - class FilterNode implements IFilterNode { - - /** - * Constructs a new FilterNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IFilterNode); - - /** FilterNode expression. */ - public expression: string; - - /** - * Creates a new FilterNode instance using the specified properties. - * @param [properties] Properties to set - * @returns FilterNode instance - */ - public static create(properties?: aggregator.IFilterNode): aggregator.FilterNode; - - /** - * Encodes the specified FilterNode message. Does not implicitly {@link aggregator.FilterNode.verify|verify} messages. - * @param message FilterNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IFilterNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FilterNode message, length delimited. Does not implicitly {@link aggregator.FilterNode.verify|verify} messages. - * @param message FilterNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IFilterNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FilterNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FilterNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.FilterNode; - - /** - * Decodes a FilterNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FilterNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.FilterNode; - - /** - * Verifies a FilterNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FilterNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FilterNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.FilterNode; - - /** - * Creates a plain object from a FilterNode message. Also converts values to other types if specified. - * @param message FilterNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.FilterNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FilterNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FilterNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskEdge. */ - interface ITaskEdge { - - /** TaskEdge id */ - id?: (string|null); - - /** TaskEdge source */ - source?: (string|null); - - /** TaskEdge target */ - target?: (string|null); - } - - /** Represents a TaskEdge. */ - class TaskEdge implements ITaskEdge { - - /** - * Constructs a new TaskEdge. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ITaskEdge); - - /** TaskEdge id. */ - public id: string; - - /** TaskEdge source. */ - public source: string; - - /** TaskEdge target. */ - public target: string; - - /** - * Creates a new TaskEdge instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskEdge instance - */ - public static create(properties?: aggregator.ITaskEdge): aggregator.TaskEdge; - - /** - * Encodes the specified TaskEdge message. Does not implicitly {@link aggregator.TaskEdge.verify|verify} messages. - * @param message TaskEdge message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ITaskEdge, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskEdge message, length delimited. Does not implicitly {@link aggregator.TaskEdge.verify|verify} messages. - * @param message TaskEdge message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ITaskEdge, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskEdge message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskEdge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.TaskEdge; - - /** - * Decodes a TaskEdge message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskEdge - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.TaskEdge; - - /** - * Verifies a TaskEdge message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TaskEdge message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskEdge - */ - public static fromObject(object: { [k: string]: any }): aggregator.TaskEdge; - - /** - * Creates a plain object from a TaskEdge message. Also converts values to other types if specified. - * @param message TaskEdge - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.TaskEdge, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskEdge to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskEdge - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** TaskType enum. */ - enum TaskType { - ETHTransferTask = 0, - ContractWriteTask = 1, - ContractReadTask = 2, - GraphQLDataQueryTask = 3, - RestAPITask = 4, - BranchTask = 5, - FilterTask = 6, - CustomCodeTask = 7 - } - - /** Properties of a TaskNode. */ - interface ITaskNode { - - /** TaskNode nodeType */ - nodeType?: (aggregator.TaskType|null); - - /** TaskNode id */ - id?: (string|null); - - /** TaskNode name */ - name?: (string|null); - - /** TaskNode ethTransfer */ - ethTransfer?: (aggregator.IETHTransferNode|null); - - /** TaskNode contractWrite */ - contractWrite?: (aggregator.IContractWriteNode|null); - - /** TaskNode contractRead */ - contractRead?: (aggregator.IContractQueryNode|null); - - /** TaskNode graphqlDataQuery */ - graphqlDataQuery?: (aggregator.IGraphQLQueryNode|null); - - /** TaskNode restApi */ - restApi?: (aggregator.IRestAPINode|null); - - /** TaskNode branch */ - branch?: (aggregator.IBranchNode|null); - - /** TaskNode filter */ - filter?: (aggregator.IFilterNode|null); - - /** TaskNode customCode */ - customCode?: (aggregator.ICustomCodeNode|null); - } - - /** Represents a TaskNode. */ - class TaskNode implements ITaskNode { - - /** - * Constructs a new TaskNode. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ITaskNode); - - /** TaskNode nodeType. */ - public nodeType: aggregator.TaskType; - - /** TaskNode id. */ - public id: string; - - /** TaskNode name. */ - public name: string; - - /** TaskNode ethTransfer. */ - public ethTransfer?: (aggregator.IETHTransferNode|null); - - /** TaskNode contractWrite. */ - public contractWrite?: (aggregator.IContractWriteNode|null); - - /** TaskNode contractRead. */ - public contractRead?: (aggregator.IContractQueryNode|null); - - /** TaskNode graphqlDataQuery. */ - public graphqlDataQuery?: (aggregator.IGraphQLQueryNode|null); - - /** TaskNode restApi. */ - public restApi?: (aggregator.IRestAPINode|null); - - /** TaskNode branch. */ - public branch?: (aggregator.IBranchNode|null); - - /** TaskNode filter. */ - public filter?: (aggregator.IFilterNode|null); - - /** TaskNode customCode. */ - public customCode?: (aggregator.ICustomCodeNode|null); - - /** TaskNode taskBody. */ - public taskBody?: ("ethTransfer"|"contractWrite"|"contractRead"|"graphqlDataQuery"|"restApi"|"branch"|"filter"|"customCode"); - - /** - * Creates a new TaskNode instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskNode instance - */ - public static create(properties?: aggregator.ITaskNode): aggregator.TaskNode; - - /** - * Encodes the specified TaskNode message. Does not implicitly {@link aggregator.TaskNode.verify|verify} messages. - * @param message TaskNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ITaskNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskNode message, length delimited. Does not implicitly {@link aggregator.TaskNode.verify|verify} messages. - * @param message TaskNode message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ITaskNode, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskNode message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.TaskNode; - - /** - * Decodes a TaskNode message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskNode - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.TaskNode; - - /** - * Verifies a TaskNode message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TaskNode message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskNode - */ - public static fromObject(object: { [k: string]: any }): aggregator.TaskNode; - - /** - * Creates a plain object from a TaskNode message. Also converts values to other types if specified. - * @param message TaskNode - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.TaskNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskNode to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskNode - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Execution. */ - interface IExecution { - - /** Execution epoch */ - epoch?: (number|Long|null); - - /** Execution userOpHash */ - userOpHash?: (string|null); - - /** Execution error */ - error?: (string|null); - } - - /** Represents an Execution. */ - class Execution implements IExecution { - - /** - * Constructs a new Execution. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IExecution); - - /** Execution epoch. */ - public epoch: (number|Long); - - /** Execution userOpHash. */ - public userOpHash: string; - - /** Execution error. */ - public error: string; - - /** - * Creates a new Execution instance using the specified properties. - * @param [properties] Properties to set - * @returns Execution instance - */ - public static create(properties?: aggregator.IExecution): aggregator.Execution; - - /** - * Encodes the specified Execution message. Does not implicitly {@link aggregator.Execution.verify|verify} messages. - * @param message Execution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Execution message, length delimited. Does not implicitly {@link aggregator.Execution.verify|verify} messages. - * @param message Execution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IExecution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Execution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Execution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Execution; - - /** - * Decodes an Execution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Execution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Execution; - - /** - * Verifies an Execution message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Execution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Execution - */ - public static fromObject(object: { [k: string]: any }): aggregator.Execution; - - /** - * Creates a plain object from an Execution message. Also converts values to other types if specified. - * @param message Execution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.Execution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Execution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Execution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Task. */ - interface ITask { - - /** Task id */ - id?: (aggregator.IUUID|null); - - /** Task owner */ - owner?: (string|null); - - /** Task smartWalletAddress */ - smartWalletAddress?: (string|null); - - /** Task startAt */ - startAt?: (number|Long|null); - - /** Task expiredAt */ - expiredAt?: (number|Long|null); - - /** Task memo */ - memo?: (string|null); - - /** Task completedAt */ - completedAt?: (number|Long|null); - - /** Task recurring */ - recurring?: (boolean|null); - - /** Task status */ - status?: (aggregator.TaskStatus|null); - - /** Task trigger */ - trigger?: (aggregator.ITaskTrigger|null); - - /** Task nodes */ - nodes?: (aggregator.ITaskNode[]|null); - - /** Task edges */ - edges?: (aggregator.ITaskEdge[]|null); - - /** Task executions */ - executions?: (aggregator.IExecution[]|null); - } - - /** Represents a Task. */ - class Task implements ITask { - - /** - * Constructs a new Task. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ITask); - - /** Task id. */ - public id?: (aggregator.IUUID|null); - - /** Task owner. */ - public owner: string; - - /** Task smartWalletAddress. */ - public smartWalletAddress: string; - - /** Task startAt. */ - public startAt: (number|Long); - - /** Task expiredAt. */ - public expiredAt: (number|Long); - - /** Task memo. */ - public memo: string; - - /** Task completedAt. */ - public completedAt: (number|Long); - - /** Task recurring. */ - public recurring: boolean; - - /** Task status. */ - public status: aggregator.TaskStatus; - - /** Task trigger. */ - public trigger?: (aggregator.ITaskTrigger|null); - - /** Task nodes. */ - public nodes: aggregator.ITaskNode[]; - - /** Task edges. */ - public edges: aggregator.ITaskEdge[]; - - /** Task executions. */ - public executions: aggregator.IExecution[]; - - /** - * Creates a new Task instance using the specified properties. - * @param [properties] Properties to set - * @returns Task instance - */ - public static create(properties?: aggregator.ITask): aggregator.Task; - - /** - * Encodes the specified Task message. Does not implicitly {@link aggregator.Task.verify|verify} messages. - * @param message Task message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ITask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Task message, length delimited. Does not implicitly {@link aggregator.Task.verify|verify} messages. - * @param message Task message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ITask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Task message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Task - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.Task; - - /** - * Decodes a Task message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Task - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.Task; - - /** - * Verifies a Task message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Task message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Task - */ - public static fromObject(object: { [k: string]: any }): aggregator.Task; - - /** - * Creates a plain object from a Task message. Also converts values to other types if specified. - * @param message Task - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.Task, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Task to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Task - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTaskReq. */ - interface ICreateTaskReq { - - /** CreateTaskReq trigger */ - trigger?: (aggregator.ITaskTrigger|null); - - /** CreateTaskReq startAt */ - startAt?: (number|Long|null); - - /** CreateTaskReq expiredAt */ - expiredAt?: (number|Long|null); - - /** CreateTaskReq repeatable */ - repeatable?: (boolean|null); - - /** CreateTaskReq smartWalletAddress */ - smartWalletAddress?: (string|null); - - /** CreateTaskReq memo */ - memo?: (string|null); - - /** CreateTaskReq nodes */ - nodes?: (aggregator.ITaskNode[]|null); - - /** CreateTaskReq edges */ - edges?: (aggregator.ITaskEdge[]|null); - } - - /** Represents a CreateTaskReq. */ - class CreateTaskReq implements ICreateTaskReq { - - /** - * Constructs a new CreateTaskReq. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICreateTaskReq); - - /** CreateTaskReq trigger. */ - public trigger?: (aggregator.ITaskTrigger|null); - - /** CreateTaskReq startAt. */ - public startAt: (number|Long); - - /** CreateTaskReq expiredAt. */ - public expiredAt: (number|Long); - - /** CreateTaskReq repeatable. */ - public repeatable: boolean; - - /** CreateTaskReq smartWalletAddress. */ - public smartWalletAddress: string; - - /** CreateTaskReq memo. */ - public memo: string; - - /** CreateTaskReq nodes. */ - public nodes: aggregator.ITaskNode[]; - - /** CreateTaskReq edges. */ - public edges: aggregator.ITaskEdge[]; - - /** - * Creates a new CreateTaskReq instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTaskReq instance - */ - public static create(properties?: aggregator.ICreateTaskReq): aggregator.CreateTaskReq; - - /** - * Encodes the specified CreateTaskReq message. Does not implicitly {@link aggregator.CreateTaskReq.verify|verify} messages. - * @param message CreateTaskReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICreateTaskReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTaskReq message, length delimited. Does not implicitly {@link aggregator.CreateTaskReq.verify|verify} messages. - * @param message CreateTaskReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICreateTaskReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTaskReq message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTaskReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateTaskReq; - - /** - * Decodes a CreateTaskReq message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTaskReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateTaskReq; - - /** - * Verifies a CreateTaskReq message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTaskReq message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTaskReq - */ - public static fromObject(object: { [k: string]: any }): aggregator.CreateTaskReq; - - /** - * Creates a plain object from a CreateTaskReq message. Also converts values to other types if specified. - * @param message CreateTaskReq - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CreateTaskReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTaskReq to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTaskReq - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateTaskResp. */ - interface ICreateTaskResp { - - /** CreateTaskResp id */ - id?: (string|null); - } - - /** Represents a CreateTaskResp. */ - class CreateTaskResp implements ICreateTaskResp { - - /** - * Constructs a new CreateTaskResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICreateTaskResp); - - /** CreateTaskResp id. */ - public id: string; - - /** - * Creates a new CreateTaskResp instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateTaskResp instance - */ - public static create(properties?: aggregator.ICreateTaskResp): aggregator.CreateTaskResp; - - /** - * Encodes the specified CreateTaskResp message. Does not implicitly {@link aggregator.CreateTaskResp.verify|verify} messages. - * @param message CreateTaskResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICreateTaskResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateTaskResp message, length delimited. Does not implicitly {@link aggregator.CreateTaskResp.verify|verify} messages. - * @param message CreateTaskResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICreateTaskResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateTaskResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateTaskResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateTaskResp; - - /** - * Decodes a CreateTaskResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateTaskResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateTaskResp; - - /** - * Verifies a CreateTaskResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateTaskResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateTaskResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.CreateTaskResp; - - /** - * Creates a plain object from a CreateTaskResp message. Also converts values to other types if specified. - * @param message CreateTaskResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CreateTaskResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateTaskResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateTaskResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NonceRequest. */ - interface INonceRequest { - - /** NonceRequest owner */ - owner?: (string|null); - } - - /** Represents a NonceRequest. */ - class NonceRequest implements INonceRequest { - - /** - * Constructs a new NonceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.INonceRequest); - - /** NonceRequest owner. */ - public owner: string; - - /** - * Creates a new NonceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns NonceRequest instance - */ - public static create(properties?: aggregator.INonceRequest): aggregator.NonceRequest; - - /** - * Encodes the specified NonceRequest message. Does not implicitly {@link aggregator.NonceRequest.verify|verify} messages. - * @param message NonceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.INonceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NonceRequest message, length delimited. Does not implicitly {@link aggregator.NonceRequest.verify|verify} messages. - * @param message NonceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.INonceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NonceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NonceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.NonceRequest; - - /** - * Decodes a NonceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NonceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.NonceRequest; - - /** - * Verifies a NonceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NonceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NonceRequest - */ - public static fromObject(object: { [k: string]: any }): aggregator.NonceRequest; - - /** - * Creates a plain object from a NonceRequest message. Also converts values to other types if specified. - * @param message NonceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.NonceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NonceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NonceRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NonceResp. */ - interface INonceResp { - - /** NonceResp nonce */ - nonce?: (string|null); - } - - /** Represents a NonceResp. */ - class NonceResp implements INonceResp { - - /** - * Constructs a new NonceResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.INonceResp); - - /** NonceResp nonce. */ - public nonce: string; - - /** - * Creates a new NonceResp instance using the specified properties. - * @param [properties] Properties to set - * @returns NonceResp instance - */ - public static create(properties?: aggregator.INonceResp): aggregator.NonceResp; - - /** - * Encodes the specified NonceResp message. Does not implicitly {@link aggregator.NonceResp.verify|verify} messages. - * @param message NonceResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.INonceResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NonceResp message, length delimited. Does not implicitly {@link aggregator.NonceResp.verify|verify} messages. - * @param message NonceResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.INonceResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NonceResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NonceResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.NonceResp; - - /** - * Decodes a NonceResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NonceResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.NonceResp; - - /** - * Verifies a NonceResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NonceResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NonceResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.NonceResp; - - /** - * Creates a plain object from a NonceResp message. Also converts values to other types if specified. - * @param message NonceResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.NonceResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NonceResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NonceResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddressRequest. */ - interface IAddressRequest { - - /** AddressRequest factory */ - factory?: (string|null); - - /** AddressRequest salt */ - salt?: (string|null); - } - - /** Represents an AddressRequest. */ - class AddressRequest implements IAddressRequest { - - /** - * Constructs a new AddressRequest. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IAddressRequest); - - /** AddressRequest factory. */ - public factory: string; - - /** AddressRequest salt. */ - public salt: string; - - /** - * Creates a new AddressRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AddressRequest instance - */ - public static create(properties?: aggregator.IAddressRequest): aggregator.AddressRequest; - - /** - * Encodes the specified AddressRequest message. Does not implicitly {@link aggregator.AddressRequest.verify|verify} messages. - * @param message AddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddressRequest message, length delimited. Does not implicitly {@link aggregator.AddressRequest.verify|verify} messages. - * @param message AddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddressRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.AddressRequest; - - /** - * Decodes an AddressRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.AddressRequest; - - /** - * Verifies an AddressRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AddressRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddressRequest - */ - public static fromObject(object: { [k: string]: any }): aggregator.AddressRequest; - - /** - * Creates a plain object from an AddressRequest message. Also converts values to other types if specified. - * @param message AddressRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.AddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddressRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddressRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SmartWallet. */ - interface ISmartWallet { - - /** SmartWallet address */ - address?: (string|null); - - /** SmartWallet salt */ - salt?: (string|null); - - /** SmartWallet factory */ - factory?: (string|null); - } - - /** Represents a SmartWallet. */ - class SmartWallet implements ISmartWallet { - - /** - * Constructs a new SmartWallet. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ISmartWallet); - - /** SmartWallet address. */ - public address: string; - - /** SmartWallet salt. */ - public salt: string; - - /** SmartWallet factory. */ - public factory: string; - - /** - * Creates a new SmartWallet instance using the specified properties. - * @param [properties] Properties to set - * @returns SmartWallet instance - */ - public static create(properties?: aggregator.ISmartWallet): aggregator.SmartWallet; - - /** - * Encodes the specified SmartWallet message. Does not implicitly {@link aggregator.SmartWallet.verify|verify} messages. - * @param message SmartWallet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ISmartWallet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SmartWallet message, length delimited. Does not implicitly {@link aggregator.SmartWallet.verify|verify} messages. - * @param message SmartWallet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ISmartWallet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SmartWallet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SmartWallet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.SmartWallet; - - /** - * Decodes a SmartWallet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SmartWallet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.SmartWallet; - - /** - * Verifies a SmartWallet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SmartWallet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SmartWallet - */ - public static fromObject(object: { [k: string]: any }): aggregator.SmartWallet; - - /** - * Creates a plain object from a SmartWallet message. Also converts values to other types if specified. - * @param message SmartWallet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.SmartWallet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SmartWallet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SmartWallet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AddressResp. */ - interface IAddressResp { - - /** AddressResp wallets */ - wallets?: (aggregator.ISmartWallet[]|null); - } - - /** Represents an AddressResp. */ - class AddressResp implements IAddressResp { - - /** - * Constructs a new AddressResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IAddressResp); - - /** AddressResp wallets. */ - public wallets: aggregator.ISmartWallet[]; - - /** - * Creates a new AddressResp instance using the specified properties. - * @param [properties] Properties to set - * @returns AddressResp instance - */ - public static create(properties?: aggregator.IAddressResp): aggregator.AddressResp; - - /** - * Encodes the specified AddressResp message. Does not implicitly {@link aggregator.AddressResp.verify|verify} messages. - * @param message AddressResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IAddressResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AddressResp message, length delimited. Does not implicitly {@link aggregator.AddressResp.verify|verify} messages. - * @param message AddressResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IAddressResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AddressResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AddressResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.AddressResp; - - /** - * Decodes an AddressResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AddressResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.AddressResp; - - /** - * Verifies an AddressResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AddressResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AddressResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.AddressResp; - - /** - * Creates a plain object from an AddressResp message. Also converts values to other types if specified. - * @param message AddressResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.AddressResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AddressResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AddressResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTasksReq. */ - interface IListTasksReq { - - /** ListTasksReq smartWalletAddress */ - smartWalletAddress?: (string|null); - } - - /** Represents a ListTasksReq. */ - class ListTasksReq implements IListTasksReq { - - /** - * Constructs a new ListTasksReq. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IListTasksReq); - - /** ListTasksReq smartWalletAddress. */ - public smartWalletAddress: string; - - /** - * Creates a new ListTasksReq instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTasksReq instance - */ - public static create(properties?: aggregator.IListTasksReq): aggregator.ListTasksReq; - - /** - * Encodes the specified ListTasksReq message. Does not implicitly {@link aggregator.ListTasksReq.verify|verify} messages. - * @param message ListTasksReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IListTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTasksReq message, length delimited. Does not implicitly {@link aggregator.ListTasksReq.verify|verify} messages. - * @param message ListTasksReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IListTasksReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTasksReq message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTasksReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ListTasksReq; - - /** - * Decodes a ListTasksReq message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTasksReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ListTasksReq; - - /** - * Verifies a ListTasksReq message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTasksReq message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTasksReq - */ - public static fromObject(object: { [k: string]: any }): aggregator.ListTasksReq; - - /** - * Creates a plain object from a ListTasksReq message. Also converts values to other types if specified. - * @param message ListTasksReq - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.ListTasksReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTasksReq to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTasksReq - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTasksResp. */ - interface IListTasksResp { - - /** ListTasksResp tasks */ - tasks?: (aggregator.ITask[]|null); - } - - /** Represents a ListTasksResp. */ - class ListTasksResp implements IListTasksResp { - - /** - * Constructs a new ListTasksResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IListTasksResp); - - /** ListTasksResp tasks. */ - public tasks: aggregator.ITask[]; - - /** - * Creates a new ListTasksResp instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTasksResp instance - */ - public static create(properties?: aggregator.IListTasksResp): aggregator.ListTasksResp; - - /** - * Encodes the specified ListTasksResp message. Does not implicitly {@link aggregator.ListTasksResp.verify|verify} messages. - * @param message ListTasksResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IListTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTasksResp message, length delimited. Does not implicitly {@link aggregator.ListTasksResp.verify|verify} messages. - * @param message ListTasksResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IListTasksResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTasksResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTasksResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.ListTasksResp; - - /** - * Decodes a ListTasksResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTasksResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.ListTasksResp; - - /** - * Verifies a ListTasksResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTasksResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTasksResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.ListTasksResp; - - /** - * Creates a plain object from a ListTasksResp message. Also converts values to other types if specified. - * @param message ListTasksResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.ListTasksResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTasksResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTasksResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetKeyReq. */ - interface IGetKeyReq { - - /** GetKeyReq owner */ - owner?: (string|null); - - /** GetKeyReq expiredAt */ - expiredAt?: (number|Long|null); - - /** GetKeyReq signature */ - signature?: (string|null); - } - - /** Represents a GetKeyReq. */ - class GetKeyReq implements IGetKeyReq { - - /** - * Constructs a new GetKeyReq. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IGetKeyReq); - - /** GetKeyReq owner. */ - public owner: string; - - /** GetKeyReq expiredAt. */ - public expiredAt: (number|Long); - - /** GetKeyReq signature. */ - public signature: string; - - /** - * Creates a new GetKeyReq instance using the specified properties. - * @param [properties] Properties to set - * @returns GetKeyReq instance - */ - public static create(properties?: aggregator.IGetKeyReq): aggregator.GetKeyReq; - - /** - * Encodes the specified GetKeyReq message. Does not implicitly {@link aggregator.GetKeyReq.verify|verify} messages. - * @param message GetKeyReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IGetKeyReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetKeyReq message, length delimited. Does not implicitly {@link aggregator.GetKeyReq.verify|verify} messages. - * @param message GetKeyReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IGetKeyReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetKeyReq message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetKeyReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.GetKeyReq; - - /** - * Decodes a GetKeyReq message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetKeyReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.GetKeyReq; - - /** - * Verifies a GetKeyReq message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetKeyReq message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetKeyReq - */ - public static fromObject(object: { [k: string]: any }): aggregator.GetKeyReq; - - /** - * Creates a plain object from a GetKeyReq message. Also converts values to other types if specified. - * @param message GetKeyReq - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.GetKeyReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetKeyReq to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetKeyReq - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a KeyResp. */ - interface IKeyResp { - - /** KeyResp key */ - key?: (string|null); - } - - /** Represents a KeyResp. */ - class KeyResp implements IKeyResp { - - /** - * Constructs a new KeyResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IKeyResp); - - /** KeyResp key. */ - public key: string; - - /** - * Creates a new KeyResp instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyResp instance - */ - public static create(properties?: aggregator.IKeyResp): aggregator.KeyResp; - - /** - * Encodes the specified KeyResp message. Does not implicitly {@link aggregator.KeyResp.verify|verify} messages. - * @param message KeyResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IKeyResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyResp message, length delimited. Does not implicitly {@link aggregator.KeyResp.verify|verify} messages. - * @param message KeyResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IKeyResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.KeyResp; - - /** - * Decodes a KeyResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.KeyResp; - - /** - * Verifies a KeyResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.KeyResp; - - /** - * Creates a plain object from a KeyResp message. Also converts values to other types if specified. - * @param message KeyResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.KeyResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for KeyResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateChecksReq. */ - interface IUpdateChecksReq { - - /** UpdateChecksReq address */ - address?: (string|null); - - /** UpdateChecksReq signature */ - signature?: (string|null); - - /** UpdateChecksReq id */ - id?: (string[]|null); - } - - /** Represents an UpdateChecksReq. */ - class UpdateChecksReq implements IUpdateChecksReq { - - /** - * Constructs a new UpdateChecksReq. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IUpdateChecksReq); - - /** UpdateChecksReq address. */ - public address: string; - - /** UpdateChecksReq signature. */ - public signature: string; - - /** UpdateChecksReq id. */ - public id: string[]; - - /** - * Creates a new UpdateChecksReq instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateChecksReq instance - */ - public static create(properties?: aggregator.IUpdateChecksReq): aggregator.UpdateChecksReq; - - /** - * Encodes the specified UpdateChecksReq message. Does not implicitly {@link aggregator.UpdateChecksReq.verify|verify} messages. - * @param message UpdateChecksReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IUpdateChecksReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateChecksReq message, length delimited. Does not implicitly {@link aggregator.UpdateChecksReq.verify|verify} messages. - * @param message UpdateChecksReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IUpdateChecksReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateChecksReq message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateChecksReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.UpdateChecksReq; - - /** - * Decodes an UpdateChecksReq message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateChecksReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.UpdateChecksReq; - - /** - * Verifies an UpdateChecksReq message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateChecksReq message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateChecksReq - */ - public static fromObject(object: { [k: string]: any }): aggregator.UpdateChecksReq; - - /** - * Creates a plain object from an UpdateChecksReq message. Also converts values to other types if specified. - * @param message UpdateChecksReq - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.UpdateChecksReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateChecksReq to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateChecksReq - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateChecksResp. */ - interface IUpdateChecksResp { - - /** UpdateChecksResp updatedAt */ - updatedAt?: (google.protobuf.ITimestamp|null); - } - - /** Represents an UpdateChecksResp. */ - class UpdateChecksResp implements IUpdateChecksResp { - - /** - * Constructs a new UpdateChecksResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.IUpdateChecksResp); - - /** UpdateChecksResp updatedAt. */ - public updatedAt?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new UpdateChecksResp instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateChecksResp instance - */ - public static create(properties?: aggregator.IUpdateChecksResp): aggregator.UpdateChecksResp; - - /** - * Encodes the specified UpdateChecksResp message. Does not implicitly {@link aggregator.UpdateChecksResp.verify|verify} messages. - * @param message UpdateChecksResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.IUpdateChecksResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateChecksResp message, length delimited. Does not implicitly {@link aggregator.UpdateChecksResp.verify|verify} messages. - * @param message UpdateChecksResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.IUpdateChecksResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateChecksResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateChecksResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.UpdateChecksResp; - - /** - * Decodes an UpdateChecksResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateChecksResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.UpdateChecksResp; - - /** - * Verifies an UpdateChecksResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateChecksResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateChecksResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.UpdateChecksResp; - - /** - * Creates a plain object from an UpdateChecksResp message. Also converts values to other types if specified. - * @param message UpdateChecksResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.UpdateChecksResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateChecksResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateChecksResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateWalletReq. */ - interface ICreateWalletReq { - - /** CreateWalletReq salt */ - salt?: (string|null); - - /** CreateWalletReq factoryAddress */ - factoryAddress?: (string|null); - } - - /** Represents a CreateWalletReq. */ - class CreateWalletReq implements ICreateWalletReq { - - /** - * Constructs a new CreateWalletReq. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICreateWalletReq); - - /** CreateWalletReq salt. */ - public salt: string; - - /** CreateWalletReq factoryAddress. */ - public factoryAddress: string; - - /** - * Creates a new CreateWalletReq instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateWalletReq instance - */ - public static create(properties?: aggregator.ICreateWalletReq): aggregator.CreateWalletReq; - - /** - * Encodes the specified CreateWalletReq message. Does not implicitly {@link aggregator.CreateWalletReq.verify|verify} messages. - * @param message CreateWalletReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICreateWalletReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateWalletReq message, length delimited. Does not implicitly {@link aggregator.CreateWalletReq.verify|verify} messages. - * @param message CreateWalletReq message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICreateWalletReq, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateWalletReq message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateWalletReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateWalletReq; - - /** - * Decodes a CreateWalletReq message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateWalletReq - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateWalletReq; - - /** - * Verifies a CreateWalletReq message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateWalletReq message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateWalletReq - */ - public static fromObject(object: { [k: string]: any }): aggregator.CreateWalletReq; - - /** - * Creates a plain object from a CreateWalletReq message. Also converts values to other types if specified. - * @param message CreateWalletReq - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CreateWalletReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateWalletReq to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateWalletReq - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateWalletResp. */ - interface ICreateWalletResp { - - /** CreateWalletResp address */ - address?: (string|null); - } - - /** Represents a CreateWalletResp. */ - class CreateWalletResp implements ICreateWalletResp { - - /** - * Constructs a new CreateWalletResp. - * @param [properties] Properties to set - */ - constructor(properties?: aggregator.ICreateWalletResp); - - /** CreateWalletResp address. */ - public address: string; - - /** - * Creates a new CreateWalletResp instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateWalletResp instance - */ - public static create(properties?: aggregator.ICreateWalletResp): aggregator.CreateWalletResp; - - /** - * Encodes the specified CreateWalletResp message. Does not implicitly {@link aggregator.CreateWalletResp.verify|verify} messages. - * @param message CreateWalletResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: aggregator.ICreateWalletResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateWalletResp message, length delimited. Does not implicitly {@link aggregator.CreateWalletResp.verify|verify} messages. - * @param message CreateWalletResp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: aggregator.ICreateWalletResp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateWalletResp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateWalletResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): aggregator.CreateWalletResp; - - /** - * Decodes a CreateWalletResp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateWalletResp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): aggregator.CreateWalletResp; - - /** - * Verifies a CreateWalletResp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateWalletResp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateWalletResp - */ - public static fromObject(object: { [k: string]: any }): aggregator.CreateWalletResp; - - /** - * Creates a plain object from a CreateWalletResp message. Also converts values to other types if specified. - * @param message CreateWalletResp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: aggregator.CreateWalletResp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateWalletResp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateWalletResp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents an Aggregator */ - class Aggregator extends $protobuf.rpc.Service { - - /** - * Constructs a new Aggregator service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new Aggregator service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Aggregator; - - /** - * Calls GetKey. - * @param request GetKeyReq message or plain object - * @param callback Node-style callback called with the error, if any, and KeyResp - */ - public getKey(request: aggregator.IGetKeyReq, callback: aggregator.Aggregator.GetKeyCallback): void; - - /** - * Calls GetKey. - * @param request GetKeyReq message or plain object - * @returns Promise - */ - public getKey(request: aggregator.IGetKeyReq): Promise; - - /** - * Calls GetNonce. - * @param request NonceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and NonceResp - */ - public getNonce(request: aggregator.INonceRequest, callback: aggregator.Aggregator.GetNonceCallback): void; - - /** - * Calls GetNonce. - * @param request NonceRequest message or plain object - * @returns Promise - */ - public getNonce(request: aggregator.INonceRequest): Promise; - - /** - * Calls GetSmartAccountAddress. - * @param request AddressRequest message or plain object - * @param callback Node-style callback called with the error, if any, and AddressResp - */ - public getSmartAccountAddress(request: aggregator.IAddressRequest, callback: aggregator.Aggregator.GetSmartAccountAddressCallback): void; - - /** - * Calls GetSmartAccountAddress. - * @param request AddressRequest message or plain object - * @returns Promise - */ - public getSmartAccountAddress(request: aggregator.IAddressRequest): Promise; - - /** - * Calls CreateWallet. - * @param request CreateWalletReq message or plain object - * @param callback Node-style callback called with the error, if any, and CreateWalletResp - */ - public createWallet(request: aggregator.ICreateWalletReq, callback: aggregator.Aggregator.CreateWalletCallback): void; - - /** - * Calls CreateWallet. - * @param request CreateWalletReq message or plain object - * @returns Promise - */ - public createWallet(request: aggregator.ICreateWalletReq): Promise; - - /** - * Calls CreateTask. - * @param request CreateTaskReq message or plain object - * @param callback Node-style callback called with the error, if any, and CreateTaskResp - */ - public createTask(request: aggregator.ICreateTaskReq, callback: aggregator.Aggregator.CreateTaskCallback): void; - - /** - * Calls CreateTask. - * @param request CreateTaskReq message or plain object - * @returns Promise - */ - public createTask(request: aggregator.ICreateTaskReq): Promise; - - /** - * Calls ListTasks. - * @param request ListTasksReq message or plain object - * @param callback Node-style callback called with the error, if any, and ListTasksResp - */ - public listTasks(request: aggregator.IListTasksReq, callback: aggregator.Aggregator.ListTasksCallback): void; - - /** - * Calls ListTasks. - * @param request ListTasksReq message or plain object - * @returns Promise - */ - public listTasks(request: aggregator.IListTasksReq): Promise; - - /** - * Calls GetTask. - * @param request UUID message or plain object - * @param callback Node-style callback called with the error, if any, and Task - */ - public getTask(request: aggregator.IUUID, callback: aggregator.Aggregator.GetTaskCallback): void; - - /** - * Calls GetTask. - * @param request UUID message or plain object - * @returns Promise - */ - public getTask(request: aggregator.IUUID): Promise; - - /** - * Calls CancelTask. - * @param request UUID message or plain object - * @param callback Node-style callback called with the error, if any, and BoolValue - */ - public cancelTask(request: aggregator.IUUID, callback: aggregator.Aggregator.CancelTaskCallback): void; - - /** - * Calls CancelTask. - * @param request UUID message or plain object - * @returns Promise - */ - public cancelTask(request: aggregator.IUUID): Promise; - - /** - * Calls DeleteTask. - * @param request UUID message or plain object - * @param callback Node-style callback called with the error, if any, and BoolValue - */ - public deleteTask(request: aggregator.IUUID, callback: aggregator.Aggregator.DeleteTaskCallback): void; - - /** - * Calls DeleteTask. - * @param request UUID message or plain object - * @returns Promise - */ - public deleteTask(request: aggregator.IUUID): Promise; - - /** - * Calls Ping. - * @param request Checkin message or plain object - * @param callback Node-style callback called with the error, if any, and CheckinResp - */ - public ping(request: aggregator.ICheckin, callback: aggregator.Aggregator.PingCallback): void; - - /** - * Calls Ping. - * @param request Checkin message or plain object - * @returns Promise - */ - public ping(request: aggregator.ICheckin): Promise; - - /** - * Calls SyncTasks. - * @param request SyncTasksReq message or plain object - * @param callback Node-style callback called with the error, if any, and SyncTasksResp - */ - public syncTasks(request: aggregator.ISyncTasksReq, callback: aggregator.Aggregator.SyncTasksCallback): void; - - /** - * Calls SyncTasks. - * @param request SyncTasksReq message or plain object - * @returns Promise - */ - public syncTasks(request: aggregator.ISyncTasksReq): Promise; - - /** - * Calls UpdateChecks. - * @param request UpdateChecksReq message or plain object - * @param callback Node-style callback called with the error, if any, and UpdateChecksResp - */ - public updateChecks(request: aggregator.IUpdateChecksReq, callback: aggregator.Aggregator.UpdateChecksCallback): void; - - /** - * Calls UpdateChecks. - * @param request UpdateChecksReq message or plain object - * @returns Promise - */ - public updateChecks(request: aggregator.IUpdateChecksReq): Promise; - } - - namespace Aggregator { - - /** - * Callback as used by {@link aggregator.Aggregator#getKey}. - * @param error Error, if any - * @param [response] KeyResp - */ - type GetKeyCallback = (error: (Error|null), response?: aggregator.KeyResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#getNonce}. - * @param error Error, if any - * @param [response] NonceResp - */ - type GetNonceCallback = (error: (Error|null), response?: aggregator.NonceResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#getSmartAccountAddress}. - * @param error Error, if any - * @param [response] AddressResp - */ - type GetSmartAccountAddressCallback = (error: (Error|null), response?: aggregator.AddressResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#createWallet}. - * @param error Error, if any - * @param [response] CreateWalletResp - */ - type CreateWalletCallback = (error: (Error|null), response?: aggregator.CreateWalletResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#createTask}. - * @param error Error, if any - * @param [response] CreateTaskResp - */ - type CreateTaskCallback = (error: (Error|null), response?: aggregator.CreateTaskResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#listTasks}. - * @param error Error, if any - * @param [response] ListTasksResp - */ - type ListTasksCallback = (error: (Error|null), response?: aggregator.ListTasksResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#getTask}. - * @param error Error, if any - * @param [response] Task - */ - type GetTaskCallback = (error: (Error|null), response?: aggregator.Task) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#cancelTask}. - * @param error Error, if any - * @param [response] BoolValue - */ - type CancelTaskCallback = (error: (Error|null), response?: google.protobuf.BoolValue) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#deleteTask}. - * @param error Error, if any - * @param [response] BoolValue - */ - type DeleteTaskCallback = (error: (Error|null), response?: google.protobuf.BoolValue) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#ping}. - * @param error Error, if any - * @param [response] CheckinResp - */ - type PingCallback = (error: (Error|null), response?: aggregator.CheckinResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#syncTasks}. - * @param error Error, if any - * @param [response] SyncTasksResp - */ - type SyncTasksCallback = (error: (Error|null), response?: aggregator.SyncTasksResp) => void; - - /** - * Callback as used by {@link aggregator.Aggregator#updateChecks}. - * @param error Error, if any - * @param [response] UpdateChecksResp - */ - type UpdateChecksCallback = (error: (Error|null), response?: aggregator.UpdateChecksResp) => void; - } -} - -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DoubleValue. */ - interface IDoubleValue { - - /** DoubleValue value */ - value?: (number|null); - } - - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { - - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); - - /** DoubleValue value. */ - public value: number; - - /** - * Creates a new DoubleValue instance using the specified properties. - * @param [properties] Properties to set - * @returns DoubleValue instance - */ - public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; - - /** - * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. - * @param message DoubleValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DoubleValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; - - /** - * Decodes a DoubleValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DoubleValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; - - /** - * Verifies a DoubleValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DoubleValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FloatValue. */ - interface IFloatValue { - - /** FloatValue value */ - value?: (number|null); - } - - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { - - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); - - /** FloatValue value. */ - public value: number; - - /** - * Creates a new FloatValue instance using the specified properties. - * @param [properties] Properties to set - * @returns FloatValue instance - */ - public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; - - /** - * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. - * @param message FloatValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FloatValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; - - /** - * Decodes a FloatValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FloatValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; - - /** - * Verifies a FloatValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; - - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FloatValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int64Value. */ - interface IInt64Value { - - /** Int64Value value */ - value?: (number|Long|null); - } - - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { - - /** - * Constructs a new Int64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt64Value); - - /** Int64Value value. */ - public value: (number|Long); - - /** - * Creates a new Int64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int64Value instance - */ - public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; - - /** - * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. - * @param message Int64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; - - /** - * Decodes an Int64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; - - /** - * Verifies an Int64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|Long|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { - - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|Long); - - /** - * Creates a new UInt64Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt64Value instance - */ - public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; - - /** - * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. - * @param message UInt64Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt64Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; - - /** - * Decodes a UInt64Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt64Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; - - /** - * Verifies a UInt64Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt64Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Int32Value. */ - interface IInt32Value { - - /** Int32Value value */ - value?: (number|null); - } - - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { - - /** - * Constructs a new Int32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IInt32Value); - - /** Int32Value value. */ - public value: number; - - /** - * Creates a new Int32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Int32Value instance - */ - public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; - - /** - * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. - * @param message Int32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Int32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; - - /** - * Decodes an Int32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Int32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; - - /** - * Verifies an Int32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Int32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Int32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Int32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UInt32Value. */ - interface IUInt32Value { - - /** UInt32Value value */ - value?: (number|null); - } - - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { - - /** - * Constructs a new UInt32Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt32Value); - - /** UInt32Value value. */ - public value: number; - - /** - * Creates a new UInt32Value instance using the specified properties. - * @param [properties] Properties to set - * @returns UInt32Value instance - */ - public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; - - /** - * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. - * @param message UInt32Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UInt32Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; - - /** - * Decodes a UInt32Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UInt32Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; - - /** - * Verifies a UInt32Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt32Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - - /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UInt32Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UInt32Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BoolValue. */ - interface IBoolValue { - - /** BoolValue value */ - value?: (boolean|null); - } - - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { - - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); - - /** BoolValue value. */ - public value: boolean; - - /** - * Creates a new BoolValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BoolValue instance - */ - public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; - - /** - * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. - * @param message BoolValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BoolValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; - - /** - * Decodes a BoolValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BoolValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; - - /** - * Verifies a BoolValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; - - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BoolValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StringValue. */ - interface IStringValue { - - /** StringValue value */ - value?: (string|null); - } - - /** Represents a StringValue. */ - class StringValue implements IStringValue { - - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); - - /** StringValue value. */ - public value: string; - - /** - * Creates a new StringValue instance using the specified properties. - * @param [properties] Properties to set - * @returns StringValue instance - */ - public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; - - /** - * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. - * @param message StringValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StringValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; - - /** - * Decodes a StringValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StringValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; - - /** - * Verifies a StringValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; - - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StringValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BytesValue. */ - interface IBytesValue { - - /** BytesValue value */ - value?: (Uint8Array|null); - } - - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { - - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); - - /** BytesValue value. */ - public value: Uint8Array; - - /** - * Creates a new BytesValue instance using the specified properties. - * @param [properties] Properties to set - * @returns BytesValue instance - */ - public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; - - /** - * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. - * @param message BytesValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BytesValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; - - /** - * Decodes a BytesValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BytesValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; - - /** - * Verifies a BytesValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; - - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BytesValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} From 924a64cc53910977dc5ac70e773fb662a011a55e Mon Sep 17 00:00:00 2001 From: chrisli30 Date: Wed, 20 Nov 2024 19:04:15 -0800 Subject: [PATCH 50/51] Cleaned up README to remove old instructions --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0cc6782..d78ed33 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,7 @@ import { AvaSDK } from "ava-sdk-js"; ## Development -### Regenerating gRPC Types - -In the case of `.proto` files at https://github.com/AvaProtocol/EigenLayer-AVS/blob/main/protobuf/avs.proto changes, the gRPC types needs to be regenerated.Before regenerating the types from the protocol buffers, ensure that `grpc_tools_node_protoc` is installed globally on your system. You can install it using npm: +### Install Dependencies and Download Proto Files ```bash npm install # install grpc-tools, etc. as dev dependencies @@ -49,9 +47,10 @@ npm run proto-download # Generate the TypeScript types and gRPC code based on the downloaded .proto file npm run gen-protoc -``` -> Important: the last line of the `grpc_codegen/avs_pb.js` needs to be manually added after the `gen-protoc` command. These type definitions must be exported; otherwise they will be undefined in the SDK. For example: `export const { Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest } = proto.aggregator;` +# Build the source files in to ./dist folder +npm run build +``` ### Running Tests From 23000c4969a844ccfb2d5e28120cf7e98fae8a35 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 20 Nov 2024 19:53:46 -0800 Subject: [PATCH 51/51] split workflow --- ...{run-test-on-pr.yml => dev-test-on-pr.yml} | 36 +---------------- .github/workflows/staging-test-on-pr.yml | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 35 deletions(-) rename .github/workflows/{run-test-on-pr.yml => dev-test-on-pr.yml} (59%) create mode 100644 .github/workflows/staging-test-on-pr.yml diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/dev-test-on-pr.yml similarity index 59% rename from .github/workflows/run-test-on-pr.yml rename to .github/workflows/dev-test-on-pr.yml index fdbf6fa..41ece6a 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/dev-test-on-pr.yml @@ -1,44 +1,10 @@ -name: Run tests on PR +name: Run tests againts dev version on PR on: pull_request: branches: [ main ] jobs: - staging-test: - runs-on: ubuntu-latest - environment: test # The below environment variables are only available in the test environment - - env: - TEST_API_KEY: ${{ secrets.TEST_API_KEY }} - TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} - TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} - ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} - ENDPOINT: ${{ vars.ENDPOINT }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Debug environment variables - run: | - echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" - echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" - echo "ENDPOINT: $ENDPOINT" - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18.x' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Run tests againts staging AVS - run: | - npm test - local-test: runs-on: ubuntu-latest environment: test # The below environment variables are only available in the test environment diff --git a/.github/workflows/staging-test-on-pr.yml b/.github/workflows/staging-test-on-pr.yml new file mode 100644 index 0000000..7b39402 --- /dev/null +++ b/.github/workflows/staging-test-on-pr.yml @@ -0,0 +1,40 @@ +name: Run tests against staging on PR + +on: + pull_request: + branches: [ main ] + +jobs: + staging-test: + runs-on: ubuntu-latest + environment: test # The below environment variables are only available in the test environment + + env: + TEST_API_KEY: ${{ secrets.TEST_API_KEY }} + TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} + TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} + ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} + ENDPOINT: ${{ vars.ENDPOINT }} + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Debug environment variables + run: | + echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" + echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" + echo "ENDPOINT: $ENDPOINT" + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests againts staging AVS + run: | + npm test \ No newline at end of file